In the previous tutorial, we configured the Azure Active Directory B2C to provide authentication functionality for our application. In this tutorial, we will implement and configure an ASP.Net Core Application that will use the mentioned Active Directory.
- In Visual Studio click File -> New -> Project
- In the New Project window select Visual C# -> .NET Core -> ASP.NET Core Web Application
- Choose location, enter project name and solution name, confirm with OK
- In the New ASP.NET Core Application window, select .NET Core, ASP.NET Core 2.1, Web Application (Model-View-Controller), Configure for HTTPS and click Change Authentication
- In the Change Authentication window, select Individual User Accounts
- Select Connect to an existing user store in the cloud
- Copy and paste the Domain Name from the Azure Portal
- Copy and paste the Application ID from the Azure Portal
- Copy and paste the name of the Sign-up / Sign-in Policy from the Azure Portal
- Copy and paste the name of the Reset Password Policy from the Azure Portal
- Finally, copy the Reply URI and paste it IN the Azure Portal and click Save
- Next, confirm your settings in the Visual Studio by clicking on the OK button in the Change Authentication window.
- In the New ASP.NET Core Application window, click again on the OK button to create the project.
Now, if you start the application, you will see the Sign in button on the right side of the header.
And if you click on that button, you will be able to sign up and sign in into the application using your email address.