Hi
Is there a way in Power Automate / Power Flow where I can get all the users which belongs to a AAD security group (All_of_IT) and nested groups within the group?
e.g.
The Flow will receive the Object_Id from a PowerApp App to identify "All_of_ IT" or any other Security Group
The result set should be:
(There is a commandlet in PowerShell called Get-ADGroupMember which will do what I need, but my objective is to find a solution that is a 100% cloud-based.)
You help will be much appreciated.
Solved! Go to Solution.
Hi @IDonknowwhay,
You could use the List group transitive members method of the Graph API in a Send an HTTP request action of the Groups connector. That method should also list all the members of the nested objects.
With a filter array you can make sure it only outputs users.
Below is an example of that approach.
Hi @IDonknowwhay,
You could use the List group transitive members method of the Graph API in a Send an HTTP request action of the Groups connector. That method should also list all the members of the nested objects.
With a filter array you can make sure it only outputs users.
Below is an example of that approach.
Hi @IDonknowwhay,
I had another look, that Filter Array is not even needed. You can even get the users with the setup below.
https://graph.microsoft.com/v1.0/groups/@{variables('Object_Id')}/transitiveMembers/microsoft.graph.user?$count=true
User | Count |
---|---|
6 | |
6 | |
6 | |
4 | |
2 |
User | Count |
---|---|
11 | |
9 | |
8 | |
7 | |
4 |