Azure Active Directory (Azure AD) B2C is a cloud identity service for your consumer-facing web & mobile apps. It is highly-available, secure and scales to millions of consumer identities. Consumers can use their social accounts (Facebook, Google, Microsoft account, etc.) or create new credentials to access your apps.
In this quick start tutorial, you will develop an ASP.NET Model-View-Controller (MVC) web app that allows consumers to sign-up & sign-in to your web app using email addresses and passwords. As a bonus step, I will also show you how to add support for Facebook sign-up & sign-in.
You need a Microsoft Azure subscription to follow this hands-on tutorial. If you don’t have one, you can create a free Azure account today.
Create a new Azure AD B2C tenant
Let’s start by creating an Azure AD B2C tenant. A “tenant” (also called a “directory”) is a container for all of your consumers, apps, policies, groups and more. Sign in to the Azure classic portal (manage.windowsazure.com) with your Microsoft account. This is the same account that you used to sign up for Azure.
Select the Active Directory extension in the left hand navigation.
Select New | App Services | Active Directory | Directory | Custom Create.
Enter “contosob2c” as the Name.
Enter a unique Domain Name, such as “johndoecontosob2c” and select a Country or Region.
Check This is a B2C directory and click the check button to continue.
Your B2C tenant is now created and will appear in the Active Directory To manage your B2C settings, open the Azure portal (portal.azure.com) in a separate browser window or tab.
In the top right corner of the portal, click on your name and then click the directory you created in the previous step. If you only have one directory, then it should already be selected.
From the left nav, select Browse | Azure AD B2C.
The Azure AD B2C Settings blade will open, providing full access to configuration and other settings.