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

Kevin 1 Reputation point


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

    @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:


    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