Forum Discussion

venkatchandra2024's avatar
venkatchandra2024
Copper Contributor
Aug 13, 2024

need help on list of Azure entra id groups associated for the appid / registered application

I need to write a script to list  groups  associated with application using PowerShell , please  help  
  • oliwer_sundgren's avatar
    oliwer_sundgren
    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, PrincipalType

     

     

    So 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

     

Resources