I was working through setting up Azure AB B2C (link) at the weekend and came across an error when trying to set it up.
The subscription is not registered to use namespace 'Microsoft.AzureActiveDirectory'. See https://aka.ms/rps-not-found for how to register subscriptions.
On doing some searching it turns out that there are a number of "Providers" which Azure has under the hood and, understandably, not all of them are applicable to everyone so not all of them are enabled by default.
It turns out it's relatively straight forward to enable the 'Microsoft.AzureActiveDirectory' provider so in this post I will walk through how to do this.
The rest of this post assumes you already have an Azure login and subscription setup. You will need both to proceed.
I will also be working through the steps using the Azure CLI so if you don't have that installed then please go a head and get that setup.
First you will need to login to azure. Start up a shell and type the following command.
This will start up a browser and you will need to log into Azure.
You will then need specify which subscription you are going to work on. If you have one subscription then the default will be selected. If not then you will need to check your subscriptions and then set the right one.
Using 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
In this instance the name "Pay-As-You-Go" is my scription name I want to target.
Next is to register the namespace provider.
az provider register --namespace Microsoft.AzureActiveDirectory
This may take several minutes to complete.
Once complete you will now be able to continue setting up Azure AD B2C in the Azure Portal.
In this post we have walked through how to enable the Azure provider
Microsoft.AzureActiveDirectory on an Azure Subscription and continue to setup an Azure AD B2C tenant.
Any questions/comments then please contact me on Twitter @WestDiscGolf