Skip to content
New issue

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

List group members and expand "manager" if member is an user (all in one query) #77

Closed
mtosic opened this issue Jan 21, 2017 · 2 comments

Comments

@mtosic
Copy link

mtosic commented Jan 21, 2017

Hi, I wan't to list all members of a group, filter if odata.type = "#microsoft.graph.user" and then expand on property "manager". I don't want to send N queries to fetch "manager" property for every member in a group.

Is it possible to do it in one query with Graph .NET client? I've tried something like:
var members = await (graphClient.Groups[group.Id].Members.Request() as IGraphServiceUsersCollectionRequest).Expand("manager").GetAsync();
but it's not working.

Any help would be appreciated.

@MIchaelMainer
Copy link
Contributor

@mtosic Can you post your question to StackOverflow with your question and tag it with MicrosoftGraph? Then provide the link in this issue. This way we can get more eyes on the answer. Also, can you use Fiddler and capture the request and response and share it in your SO post so that we can see what is going on?

@MIchaelMainer
Copy link
Contributor

The manager property is a navigation property on a user so you'll have to request that property value for each user.

@microsoftgraph microsoftgraph locked as resolved and limited conversation to collaborators Feb 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants