Get started with Azure AD B2C

Azure AD B2C Part 1

This is part 1 of a series covering Azure AD B2C features. In this post, I talk about what is Azure AD B2C and why it is useful. Then I explain steps to get started with AD B2C and create a new tenant.

What is Azure AD B2C

Azure AD B2C (Active Director Business-to-Consumer) is a cloud based authenticaion service from Microsoft to help you add external identity management to your applications. With AD B2C, you can let users self sign-up, sign-in and manage their account, let them use their existing social identity (such as Google, Facebook, GitHub etc.), secure their accounts with Multi-factor authentication via email or SMS. Your application only needs to point to the AD B2C tenant to use it in your application. You can use the AD B2C accounts in a web, mobile or even desktop applications.

Why do I need Azure AD B2C

Well, the question is rather Why do I need an external identity solution?

If you are developing a fairly medium to large scale software, eventually your user base will grow and it will compel you to provide your users a personalized experience. Managing user accounts in your application comes with lot of overheads and also has several concerns such as keeping user’s credentials secure. Instead of witing code and managing databases for storing user’s data, it is far better and easier to trust on a 3rd party offering. There are various Identity As a Service providers to choose from such as Auth0, Okta and many others. Choice depends on your requirements and features provided by these platforms and your personal / organisational preferences. If your organisation is heavily invested in Azure already, then choosing Azure AD B2C makes sense. Most of the platforms offer a free tier with enough capabilities to get you started.

Create Azure AD B2C tenant

You will need a Microsft Azure account with a valid subscription to create AD B2C. If you do not already have one, you can sign up for a free Azure account here, which gives some credit and some services free for 12 months.

What is a tenant?
An AD B2C tenant is a container to hold your applications, users, policies and such resources.

Log in to Azure portal with your Azure account.


In the Search textbox, type in B2C and then select Azure Active Directory B2C from the list shown.


Click on Create to start creating a new AD B2C tenant.


Select Create a new Azure AD B2C Tenant as shown below.


On the next screen, fill in details about your tenant.


Click on Review + Create, Review your details and then click on Create to create the AD B2C tenant. The creation takes some time.

If you get an error as The subscription is not registered to use namespace ‘Microsoft.AzureActiveDirectory’. See for how to register subscriptions., then you need to register your Azure subscription to create an AD Tenant. Follow the steps on this page and register Microsoft.AzureActiveDirectory for your subscription. You will need to follow the above steps AD B2C tenant creation again.

Once the resource is created, you should see a message indicating success. Click on that message to navigate to your newly created AD B2C tenant.



The AD B2C offers a free tier with up to 50,000 monthly user authentications as of this writing. It also allows you to customize the sign-in and sign-up pages to suit your branding. I will explore that and some other cool features in future articles. Stay tuned!

Thank you for reading. If you liked this post, please share on social media using the links below. If you have any feedback, please send me a DM on Twitter. Keep learning!