When creating a Azure Active Directory in my new Visual Studio Azure Subscription I got an error:
The subscription is not registered to use namespace ‘Microsoft.AzureActiveDirectory’
After some research I found out not all Resource Providers are enabled by default. One of them being: Microsoft.AAD. So you need to Register this in the Resource Provider manager.
But get this: You need to be patient! It can say Registered like in the image below but it takes some time. I found this out by using CLI when it was not working after 20 minutes. (Code below) When is tried to Register the AAD namespace again I got a message that it was working on it already and I could use a command to wach its progress. So don’t get fooled with this nice green icon that is telling you it’s done.
And maybe it is a coïncedence or me trying register this with CLI just gave it the kick in the behind it needed.
I don’t know and I will never will know.
1 2 3 4 5 6 7 8 9 10 11 |
CLI Code az login az account set --subscription "XXXXXX-138e-46a0-bc79-XXXXXX" az provider register --namespace Microsoft.AzureActiveDirectory az provider show -n Microsoft.AzureActiveDirectory |