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

Groups' members count #6221

Closed
ivanboscolo opened this issue Nov 6, 2019 — with docs.microsoft.com · 2 comments
Closed

Groups' members count #6221

ivanboscolo opened this issue Nov 6, 2019 — with docs.microsoft.com · 2 comments
Assignees

Comments

Copy link

ivanboscolo commented Nov 6, 2019

Is it possible to obtain a count of the groups' members without actually expanding the members? $count is currently not supported for directoryObjects, but expanding the members can become quickly inefficient. Thank you for your feedback.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@yyuank
Copy link
Contributor

yyuank commented Apr 7, 2020

&count API is still in Private Preview, so it's not documented. You can try this api to get count: beta/groups/{group-id}/members/$count?ConsistencyLevel=eventual
This will return the number of members of the group. If you want to include the numbers of members of nested groups, simply replace members with transitiveMembers.

@yyuank yyuank closed this as completed Apr 7, 2020
@nickbower
Copy link

nickbower commented May 26, 2020

Should this be reopened because the official docs permit count are so I believe are not inline with the implementation?

From https://docs.microsoft.com/en-us/graph/query-parameters#count-parameter

The $count query parameter is supported for these collections of resources and their relationships that derive from directoryObject:

application
orgContact
device
group
servicePrincipal
users.

@msftbot msftbot bot locked as resolved and limited conversation to collaborators Jul 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants