Skip to content

Instantly share code, notes, and snippets.

@thdotnet
Last active January 31, 2022 18:33
Show Gist options
  • Save thdotnet/5cbf2e9af85cd826b5e56f536bf9b648 to your computer and use it in GitHub Desktop.
Save thdotnet/5cbf2e9af85cd826b5e56f536bf9b648 to your computer and use it in GitHub Desktop.
fixing The subscription is not registered to use namespace 'Microsoft.AzureActiveDirectory'
# 1
Start up a shell and type the following command.
az login
This will start up a browser and you will need to log into Azure.
# 2
Use the account list command you can get a list of your subscriptions.
az account list
Once the required subscription is located it needs to be set.
az account set --subscription "Pay-As-You-Go
# 3
az provider register --namespace Microsoft.AzureActiveDirectory
ps: SELECT THE RIGHT SUBSCRIPTION NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment