Azure AD B2C Integration with ASP.NET Core Application- Multi Factor Authentication (MFA)


In this article you will learn how to integrate multi factor authentication (MFA) with Azure B2C for an ASP.NET Core application. This is continuation of my previous article where I have discussed about step-by-step process of Azure AD B2C integration with ASP.NET Core application. I highly recommend you to go through my articles as given below, before reading this article.

Quick Start – Azure AD B2C integration with ASP.NET Core application

Azure AD B2C Intergration With ASP.NET Core Application- Custom Layout

What is MFA?

Multifactor Authentication is a process of adding one more security level on top of traditional sign in flow. With this authentication process user will authenticate by providing a code on mobile device, email or a fingerprint scan and many more.

In this article we will see, how to integrate the MFA with Azure B2C, so that when user login by providing their credential, the application will prompt an MFA screen to enter a code that sent to the user email address.

Azure AD B2C with MFA
Enabling MFA for Azure B2C:

Login to Azure portal and switch to B2C tenant.

Select user flows from policies blade. Select our SignIn_SignUp_Flow, as shown in the below figure.

SignIn SinUp Flow

Select properties from Settings blade

Enable MFA

Save the changes

Now run the ASP.NET Core application, which was developed in my previous article.

After providing a credentials in the sign in page, you will end up with the MFA screen.

Sign In Screen

MFA Screen

Click on send verification code button. It will send the verification code to your registered email address.

Provide the code in next screen. After providing the code, you will land into home screen.

MFA Validation screen

Home screen after completing the MFA process.


We have seen how to enable the multi factor authentication(MFA) for the user flow (Sign In and Sign Up) in Azure B2C and how easily it incorporate the MFA to our ASP.NET Core web application.


Multifactor authentication in Azure Active Directory B2C | Microsoft Learn


Leave a Reply

%d bloggers like this: