microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
QueryParameters Ignored in GraphServiceClient Requests
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
Describe the bug
The following code is used to retrieve group data from Microsoft Graph with specific QueryParameters:
var groupPage = await _graphServiceClient.Groups.GetAsync(requestConfiguration =>
{
requestConfiguration.QueryParameters.Top = 999;
requestConfiguration.QueryParameters.Select = new[] { "id", "displayName" };
requestConfiguration.QueryParameters.Expand = new[] { "members" };
requestConfiguration.QueryParameters.Filter = "securityEnabled eq true";
});
Issues Observed:
Top Parameter Ignored: Despite setting requestConfiguration.QueryParameters.Top = 999, only the default 100 results are returned. This indicates that the Top parameter is not being applied correctly, and the response is limited to the default page size.
Expand Parameter Not Applied: The Expand parameter is set to include the members property of each group. However, the response does not contain the expanded members data, suggesting that the Expand query option is being ignored or not processed as expected.
Expected behavior
The response should return up to 999 results per page.
Each group object should include its members as specified by the Expand parameter.
How to reproduce
var groupPage = await _graphServiceClient.Groups.GetAsync(requestConfiguration =>
{
requestConfiguration.QueryParameters.Top = 999;
requestConfiguration.QueryParameters.Select = ["id", "displayName"];
requestConfiguration.QueryParameters.Expand = ["members"];
requestConfiguration.QueryParameters.Filter = "securityEnabled eq true";
})
SDK Version
5.58.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source files or tests. Start by running the reproduction against SDK 5.58.0 and inspecting the outgoing request for the Top and Expand query parameters; done means the request applies both options and the response matches the stated expectations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100