Hi,
I am building a flow where I am trying to retrieve the group members from Azure AD and create a Sharepoint list with all the new members by checking if the member exists in the list already or not. My flow works, however the issue is I can only maximum get 999 members (using the advanced options -> Top: 999). This group has well over 15000 members, and was wondering if there is any workaround to be able to look at all the members in the Azure AD group. Thanks!
Hi @Vi1
Probably you need to use Graph API to query Azure AD: List members - Microsoft Graph v1.0 | Microsoft Docs
If you still have problems with the threshold, you could split your query in some subqueries based on the displayname of the users: A query like https://graph.microsoft.com/v1.0/groups/{id}/members?$count=true&$filter=startswith(displayName, 'a') for example.
You could follow this article on how to use Graph API with Power Automate: Using Flow with Graph API - Lee Ford's Blog (lee-ford.co.uk) Although there's an inconvenience: HTTP connector is a premium one.
Hope it helps!
Ferran
@fchopo Yes, I have tried, but I get an error saying the maximum threshold is 5000.
Hi @Vi1
Have you tried to enable pagination and set a threshold value to 15000, for example?
An exact thread can be found here: Solved: Get more than 999 Azure AD group members - Power Platform Community (microsoft.com)
Hope it helps!
Ferran