When you are working on applications which will be used by customers, you can use the Azure Active Directory to take care of sign-in and access management. This can help you to focus on the business functionality of your application and Azure will take care of access management.
Azure AD B2C can be used for this purpose. In next few blogs, we will see how to create Azure AD B2C tenant and will try to use it for authenticating your web applications and web APIs.
In this first part of the series, we will just create Azure AD B2C tenant.
Create Azure AD B2C
Login to Azure portal and then click on Create a resource. In the new panel opened, search for “Azure AD B2C” and click on option to create it.
It will open below screen. Then click on Create button.
After clicking on Create button, a new panel will open. The panel will provide you two options.
- First option to create a new Azure AD B2C tenant
- Second option is to link existing Azure AD B2C tenant to your Azure subscription
As we are creating new instance of B2C tenant, let’s click on first option.
Then a new panel will be displayed. On this new panel, you can enter details about new B2C tenant. There are three input fields:
- Organization name, the organization for which this tenant is getting created.
- Initial domain name, the domain name for your new Azure AD B2C tenant. It needs to be globally unique.
- Country or region, the Azure region in which the tenant will be created.
After providing these inputs, you can click on Create button. The creation will take around a minute to complete.
Link to Azure subscription
While the instance is getting created, you can click on the hyperlink which is highlighted in below snapshot.
The below panel will appear. This time we need to select the second option as we are trying to link your newly created Azure AD B2C tenant to your subscription.
A new panel will open on right side. There you need to provide three inputs:
- Select B2C tenant name from the dropdown
- Next, select subscription name from the dropdown
- Resource group, the resource group name under which you want to logically see your B2C tenant.
Then you can click on Create. This operation is instant and you will be able to see the B2C tenant under your resource group.
Switch to New Directory
By default, when you create an Azure subscription, you get a default directory. When you login to Azure portal, you always have this default directory selected.
If you want to switch to newly created B2C directory, then click on the top right corner. The popup will show “Switch Directory” button.
Once you click on “Switch Directory” you will be shown below popup. You can then click on newly created B2C tenant. This will open the new tenant in new tab of the browser.
If this panel is not showing your newly created B2C tenant, then you can refresh the page. The newly created tenant should appear after refreshing the page.
I hope you enjoyed this article. Let me know your thoughts.