We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to select a group of users with their known identities by doing the following request:
POST /v1.0/users/getByIds?$select=id,displayName,identities HTTP/1.1 Host: graph.microsoft.com Content-Type: application/json Content-Length: 48 {"ids":["aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"]}
This should be translate to something like the following in C#
var user = await client.Users .GetByIds.PostAsGetByIdsPostResponseAsync(new GetByIdsPostRequestBody() { Ids = ["aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"], }, cfg => { cfg.QueryParameters.Select = ["id", "displayName", "identities"]; });
However the cfg.QueryParameters.Select property is not available for client.Users.GetByIds.PostAsGetByIdsPostResponseAsync() request
cfg.QueryParameters.Select
client.Users.GetByIds.PostAsGetByIdsPostResponseAsync()
The Select query parameter should be available in the PostAsGetByIdsPostResponseAsync configuration body, as it is available in the actual api
Use the following code snippet:
5.68.1
No response
non,
something like the following should work, but the query parameters are ignored:
var postRequest = client.Users.GetByIds.ToPostRequestInformation(new() { Ids = ["aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"] }); postRequest.QueryParameters.Add("%24select", "id,displayName,identities"); var users = await client.RequestAdapter.SendAsync<GetByIdsPostResponse>(postRequest, GetByIdsPostResponse.CreateFromDiscriminatorValue);
The text was updated successfully, but these errors were encountered:
I found a work around, the UrlTemplate is also incorrect and should be expanded. The below code is working (though really ugly)
var requestInfo = client.Users.GetByIds.ToPostRequestInformation(new() { Ids = ["aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"], }); requestInfo.UrlTemplate += "{?%24expand,%24select}"; requestInfo.QueryParameters.Add("%24select", new [] {"id","displayName","identities","mail"}); var response = await client.RequestAdapter.SendAsync<GetByIdsPostResponse>(requestInfo, GetByIdsPostResponse.CreateFromDiscriminatorValue); var users = response?.Value?.OfType<User>() ?? [];
Sorry, something went wrong.
No branches or pull requests
Describe the bug
I would like to select a group of users with their known identities by doing the following request:
This should be translate to something like the following in C#
However the
cfg.QueryParameters.Select
property is not available forclient.Users.GetByIds.PostAsGetByIdsPostResponseAsync()
requestExpected behavior
The Select query parameter should be available in the PostAsGetByIdsPostResponseAsync configuration body, as it is available in the actual api
How to reproduce
Use the following code snippet:
SDK Version
5.68.1
Latest version known to work for scenario above?
No response
Known Workarounds
non,
something like the following should work, but the query parameters are ignored:
Debug output
No response
Configuration
Other information
No response
The text was updated successfully, but these errors were encountered: