How to get "ACCOUNT ADMIN" for a specific subscription through Azure CLI or Az PowerShell?

Kevin 1 Reputation point
2021-08-19T07:00:24.37+00:00

124558-image.png

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,800 questions
{count} votes

1 answer

Sort by: Most helpful
  1. prmanhas-MSFT 17,891 Reputation points Microsoft Employee
    2021-08-24T09:35:03.3+00:00

    @Kevin Apologies for the delay in response and all the inconvenience caused because of the issue.

    You can run the below command which will have the output containing Account Admin for specific subscription. User with Contributor or Owner role should be able to run this command since it needs privilege to access the data.

    Get-AzRoleAssignment -Scope /subscriptions/<subscription id> -IncludeClassicAdministrators  
    

    Output will have something like this:

    126007-image.png

    Hope it helps!!!

    Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics

    4 people found this answer helpful.
    0 comments No comments