Hi @Allen Lenhart • Thank you for reaching out.
You can use below graph calls for this purpose.
To test these calls, open [Graph Explorer][1] and sign-in using Global Administrator account by clicking on the sign-in button in left pane.
- For On-premises synced groups: GET https://graph.microsoft.com/beta/groups?$filter=onPremisesSyncEnabled eq true&select=displayname
- For Dynamic groups: GET https://graph.microsoft.com/beta/groups?$filter=groupTypes/any(x:x eq 'DynamicMembership')&$select=displayname&$count=true
- For Assigned groups: GET https://graph.microsoft.com/beta/groups?$filter=NOT(groupTypes/any(x:x eq 'DynamicMembership'))&$select=displayname&$count=true
Note: You need to add header ConsistencyLevel=eventual
with above calls.
Permissions required:
- Directory.ReadWrite.All or Group.ReadWrite.All or Group.Read.All or Directory.Read.All
- Directory.AccessAsUser.All
-----------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.