microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
Expression syntax for Select is missing in v5
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
Describe the bug
When using v4 you can choose which fields to include using an Expression<...>. I cannot find the equivalent in v5, the migration guide only mentions using an array of strings.
To Reproduce
Steps to reproduce the behavior:
- Use v4 of the library
- Have code like
var o365users = await client.Users.Request().Select(u => new { u.UserPrincipalName, u.Mail }).GetAsync(); - Upgrade to v5 of the library
- Have code like
var o365users = await client.Users.GetAsync(requestConfiguration => { requestConfiguration.QueryParameters.Select = new[] { "???", "???" }; });
Expected behavior
The ability to use expression syntax without having to resort to undiscoverable strings that require knowing how the underlying API works.
Related issues
https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/166
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
Start with the v5 query-parameter options section in docs/upgrade-to-v5.md and review related issue #166. Compare the v4 expression-based Select example with the v5 request configuration shown here. Done means v5 offers a discoverable expression-based way to select fields without requiring undocumented API field strings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100