Subscription is not registered to use namespace Microsoft.AzureActiveDirectory

A brief walk through how to use Azure AD B2C when your subscription is not setup to use the provider.

Published on 02 March 2021


I was working through setting up Azure AB B2C (link) at the weekend and came across an error when trying to set it up.

AzureB2C Create Error

The subscription is not registered to use namespace 'Microsoft.AzureActiveDirectory'. See 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.


Step 1

First you will need to login to azure. 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.

Step 2

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.

Step 3

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.

AzureB2C Create Validation Pass


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