Tutorial: Create an Azure Active Directory B2C tenant

Before your applications can interact with Azure Active Directory B2C (Azure AD B2C), they must be registered in a tenant that you manage.

In this article, you learn how to:

  • Create an Azure AD B2C tenant
  • Link your tenant to your subscription
  • Switch to the directory containing your Azure AD B2C tenant
  • Add the Azure AD B2C resource as a Favorite in the Azure portal

You learn how to register an application in the next tutorial.

If you don't have an Azure subscription, create a free account before you begin.

Create an Azure AD B2C tenant

  1. Sign in to the Azure portal.

  2. Make sure you're using the directory that contains your subscription.

    Select the Directory + subscription filter in the top menu and then select the directory that contains your subscription. This directory is different from the one that will contain your Azure AD B2C tenant.

    Directory + subscription filter with subscription tenant selected

  3. Select Create a resource in the top-left corner of the Azure portal.

  4. Search for and select Active Directory B2C, then select Create.

  5. Select Create a new Azure AD B2C Tenant.

    Create a new Azure AD B2C tenant selected in Azure portal

  6. Enter an Organization name and Initial domain name. Select the Country or region (it can't be changed later), and then select Create.

    The domain name is used as part of your full tenant domain name. In this example, the tenant name is contosob2c.onmicrosoft.com:

    Create tenant form in with example values in Azure portal

  7. Once the tenant creation is complete, select the Create new B2C Tenant or Link to existing Tenant link at the top of the tenant creation page.

    Link tenant breadcrumb link highlighted in Azure portal

  8. Select Link an existing Azure AD B2C Tenant to my Azure subscription.

    Link an existing subscription selection in Azure portal

  9. Select the Azure AD B2C Tenant that you created, then select your Subscription.

    For Resource group, select Create new. Enter a Name for the resource group that will contain the tenant, select the Resource group location, and then select Create.

    Link subscription settings form in Azure portal

Select your B2C tenant directory

To start using your new Azure AD B2C tenant, you need to switch to the directory that contains the tenant.

Select the Directory + subscription filter in the top menu of the Azure portal, then select the directory that contains your Azure AD B2C tenant.

If at first you don't see your new Azure B2C tenant in the list, refresh your browser window, then select the Directory + subscription filter again in the top menu.

B2C tenant-containing directory selected in Azure portal

Add Azure AD B2C as a favorite (optional)

This optional step makes it easier to select your Azure AD B2C tenant in the following and all subsequent tutorials.

Instead of searching for "Azure AD B2C" in All services every time you want to work with your tenant, you can instead favorite the resource. Then, you can select it from the left-hand Favorites menu to quickly browse to your Azure AD B2C tenant.

You only need to perform this operation once. Before performing these steps, make sure you've switched to the directory containing your Azure AD B2C tenant as described in the previous section, Select your B2C tenant directory.

  1. Select All services in the left menu of the Azure portal
  2. Enter Azure AD B2C in the search text box
  3. Select the star to add Azure AD B2C to your favorites
  4. Azure AD B2C now appears in the Favorites left-hand menu. You can then select and drag it higher in the list, if you like, as the following image shows:

Steps to add Azure AD B2C as a favorite in the Azure portal

Next steps

In this article, you learned how to:

  • Create an Azure AD B2C tenant
  • Link your tenant to your subscription
  • Switch to the directory containing your Azure AD B2C tenant
  • Add the Azure AD B2C resource as a Favorite in the Azure portal

Next, learn how to register a web application in your new tenant.