Symptoms
When you run Azure PowerShell cmdlets, you receive an error message that resembles the following:
Get-AzureADUser : {"odata.error":{"code":"Authorization_RequestDenied","message":{"lang":"en","value":"Insufficient privileges to complete the operation."}}}
Cause
This problem occurs because the user account that is being used to run the Azure PowerShell cmdlets does not have the correct administrator role.
Resolution
To resolve this problem, use one of the following methods:
-
Run the PowerShell cmdlets by using a user account that has the correct administrator role.
-
Promote the problem user account to the correct administrator role.
For example you may be required to have a global administrator role in the Azure Active Directory in order to run the cmdlets.