Using Azure AD B2C in ASP.NET Core applications
In the last section, we configured Azure AD B2C and user workflows. In this section, we will be configuring an ASP.NET Core MVC application to use the user workflow to support user sign-up and sign-in with Azure AD B2C.
We will be using the dotnet CLI to create the application with ASP.NET Core MVC. We will be using the dotnet new mvc
command with some extra parameters for supporting authentication using Azure AD B2C. We can follow the steps and start integrating the Azure AD B2C application into ASP.NET Core:
- First, we need to copy the application ID we created in Azure AD B2C. Then, we need to copy the Azure AD B2C tenant ID – we can get both of these values from the Azure AD B2C application overview page, as shown in the following figure:
Figure 13.14 – Application overview page
- We need to copy the user workflow name from the User flows list.
- Next, open the terminal and...