Quantcast
Channel: Azure Active Directory forum
Viewing all articles
Browse latest Browse all 16000

Using API Azure AD Graph, I need to get all members from a group

$
0
0
Hello,

My purpose is to get all members of some groups. I am using the REST API Azure AD Graph.

First I wanted to use the option $expand. The problem is the limit of 20 objects returned. I don't want a limit.

So I chain requests :

- To get groups : https://graph.windows.net/xx.onmicrosoft.com/groups?api-version=2013-11-08

- For each group, I get members :  https://graph.windows.net/xx.onmicrosoft.com/groups/5c79ef0d-0ad4-4942-8fae-3c750a6c772c/$links/members?api-version=2013-11-08

- I get user object for all members using objectId :  https://graph.windows.net/xx.onmicrosoft.com/users?$filter=(objectId%20eq%20'1993c201-444b-4bc2-a797-72683f0fe896')%20or%20(objectId%20eq%20'3e185f27-78d4-4970-b167-29fb2f8f8959')&api-version=2013-11-08

My problem is that I get an error when I use a filter with multiple objectId : The 'objectId' property can only be used to read a single object.

Is there a way to do a filter with multiple objectId ? like : $filter=(objectId eq '1993c201-444b-4bc2-a797-72683f0fe896') or (objectId eq '3e185f27-78d4-4970-b167-29fb2f8f8959')

Is there an other way to get all members of group without limit ?

Thanks for your time.

Viewing all articles
Browse latest Browse all 16000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>