Forum Discussion
need help on list of Azure entra id groups associated for the appid / registered application
- Aug 15, 2024
Hello againvenkatchandra2024 !
If you run the following instead then you will get the Name of the group or user that is assigned to the application in a nice list 🙂
Connect-MgGraph -Scope "Application.Read.All" $ServicePrincipalId = "<YourEnterpriseAppObjectID>" Get-MgServicePrincipalAppRoleAssignedTo -ServicePrincipalId $ServicePrincipalId | select PrincipalDisplayName, PrincipalTypeSo all you need to edit is the last command. And your output will look like this
Let me know how it goes!
Kind Regards
Oliwer Sundgren
Hellovenkatchandra2024 !
You should be able to do this with a Graph API call.
Try doing a GET to the following
Replace [ID] with the actual Object ID of the Enterprise App you want to check
https://graph.microsoft.com/beta/servicePrincipals/[ID]/appRoleAssignments
for example
https://graph.microsoft.com/beta/servicePrincipals/0000000-0000-0000-0000-000000000000/appRoleAssignments
Let me know if this helps or if you need further assistance!
Kind Regards
Oliwer Sundgren
oliwer_sundgren Thank you for the response, I will try through Rest.
I am still wanting to write PowerShell program using Azure graph due to access issues
- oliwer_sundgrenAug 14, 2024Iron Contributor
No problem venkatchandra2024 hope it helps 🙂
If you want to do it with a Graph Powershell cmdlet then you could try the following
$ServicePrincipalId = "<YourEnterpriseAppObjectID>"
Get-MgServicePrincipalAppRoleAssignedTo -ServicePrincipalId $ServicePrincipalIdIf this works for you feel free to mark my response as "Best response"
Cheers
Oliwer Sundgren