Skip to content

QueryParameters should not offer Expand for Teams #3097

@ssteiner

Description

@ssteiner

Describe the bug

I'm implementing a search on Teams. I found through trial&error (the documentation should really be updated with details about each prop.. what requires $select, what filters are supported, that kind of things), and found that if I populate the Expand parameter in the query options, the operation fails and returns

Query option 'Expand' is not allowed. To allow it, set the 'AllowedQueryOptions' property on EnableQueryAttribute or QueryValidationSettings

Since those options are server side, it basically boils down to: don't use Expand here. So I think a tag is missing that blocks out this option from the generated code.

Expected behavior

Microsoft.Graph.Teams.TeamsRequestBuilder.TeamsRequestBuilderGetQueryOptions should not offer the Expand property.

How to reproduce

Run this operation

var items = await graphServiceClient.Teams.GetAsync(o => 
{
    o.QueryParameters.Expand = ["members"];
}).ConfigureAwait(false);

SDK Version

5.104.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

Win 11 2024H2 on x64
.NET SDK 10.0.202

### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions