In my powershell script, I have used Get-AzADApplication (from Az.resources module) to get an Enterprise Application. I can see the particular approle I am interested in (with an ID) in the result. How can I then get all the users and groups that has the appRoles?
From the portal, looks like ManagedApplications//AppRoleAssignments was used to fetch that info. What’s the powershell equivalent?
2
Answers
You can use below powershell command to retrieve the application role assignments for a service principal.
Below image shows the users assigned the app roles.
Use below command to achieve the expected results.
For Users:
For Groups:
Refer
Get-AzRoleAssignment
Azure PowerShell Command.