Mar 14 2023 04:17 AM
Hey all,
Was wondering if someone has an idea or even the solution to get the members of cloud only groups in Azure AD.
I achieved showing cloud only groups via:
groups?$select=id,displayName,description,mailNickname,onPremisesSamAccountName,onPremisesSyncEnabled,securityIdentifier&$filter=onPremisesSyncEnabled eq null&$count=true
Header contains ConsistencyLevel = eventual as described in (https://learn.microsoft.com/en-us/graph/aad-advanced-queries?tabs=http)
But for now I can't find a working solution to only show the members for these groups. Someone any idea how to build the query?
With kind regards,
Sebastian Mellebeek
Mar 14 2023 04:28 AM
Mar 14 2023 05:05 AM
Mar 14 2023 05:15 AM
@Sebastian Mellebeek try this and let me know if it works
Go to the Microsoft Graph Explorer website: https://developer.microsoft.com/en-us/graph/graph-explorer
Sign in with your Microsoft account.
Select the "v1.0" version of the Microsoft Graph API.
In the query box, enter the following URL:
This will retrieve all groups in your organization that are cloud-only (i.e., have the "Unified" group type).
Click the "Run query" button.
If there are many groups, you may need to use the $top query parameter to limit the number of results returned. For example, you can add ?$top=50 to the end of the URL to return only the first 50 groups.
For each group returned in the response, you can retrieve the members by adding /members to the end of the group's ID in the id field. For example:
Replace {group-id} with the ID of the group for which you want to retrieve the members.
If a group has many members, you may need to use the $top query parameter to limit the number of results returned. For example, you can add ?$top=50 to the end of the URL to return only the first 50 members.
If a group has more members than the $top parameter specified, you can use the $skip query parameter to retrieve the next page of results. For example, you can add ?$top=50&$skip=50 to the end of the URL to retrieve the second page of results.
Mar 14 2023 01:09 PM
Hey @eliekarkafy,
Thanks again for helping.
As of step 7, this is a new query, right? Or can we combine the query from step 4 and step 7 into one query? Because in the end, that would be the outcome that I need.
With kind regards,
Sebastian Mellebeek