Disable email verification during customer sign-up in Azure Active Directory B2C

Before you begin, use the Choose a policy type selector at the top of this page to choose the type of policy you’re setting up. Azure Active Directory B2C offers two methods to define how users interact with your applications: through predefined user flows or through fully configurable custom policies. The steps required in this article are different for each method.

By default, Azure Active Directory B2C (Azure AD B2C) verifies your customer's email address for local accounts (accounts for users who sign up with email address or username). Azure AD B2C ensures valid email addresses by requiring customers to verify them during the sign-up process. It also prevents malicious actors from using automated processes to generate fraudulent accounts in your applications.

Some application developers prefer to skip email verification during the sign-up process and instead have customers verify their email address later. To support this, Azure AD B2C can be configured to disable email verification. Doing so creates a smoother sign-up process and gives developers the flexibility to differentiate customers that have verified their email address from customers that have not.

Warning

Disabling email verification in the sign-up process may lead to spam. If you disable the default Azure AD B2C-provided email verification, we recommend that you implement a replacement verification system.

Prerequisites

Disable email verification

Follow these steps to disable email verification:

  1. Sign in to the Azure portal.
  2. If you have access to multiple tenants, select the Settings icon in the top menu to switch to your Azure AD B2C tenant from the Directories + subscriptions menu.
  3. In the left menu, select Azure AD B2C. Or, select All services and search for and select Azure AD B2C.
  4. Select User flows.
  5. Select the user flow for which you want to disable email verification.
  6. Select Page layouts.
  7. Select Local account sign-up page.
  8. Under User attributes, select Email Address.
  9. In the Requires Verification drop-down, select No.
  10. Select Save. Email verification is now disabled for this user flow.

The LocalAccountSignUpWithLogonEmail technical profile is a self-asserted, which is invoked during the sign-up flow. To disable the email verification, set the EnforceEmailVerification metadata to false. Override the LocalAccountSignUpWithLogonEmail technical profiles in the extension file.

  1. Open the extensions file of your policy. For example, SocialAndLocalAccounts/TrustFrameworkExtensions.xml.
  2. Find the ClaimsProviders element. If the element doesn't exist, add it.
  3. Add the following claims provider to the ClaimsProviders element:
<ClaimsProvider>
  <DisplayName>Local Account</DisplayName>
  <TechnicalProfiles>
    <TechnicalProfile Id="LocalAccountSignUpWithLogonEmail">
      <Metadata>
        <Item Key="EnforceEmailVerification">false</Item>
      </Metadata>
    </TechnicalProfile>
  </TechnicalProfiles>
</ClaimsProvider>

Test your policy

  1. Sign in to the Azure portal.
  2. If you have access to multiple tenants, select the Settings icon in the top menu to switch to your Azure AD B2C tenant from the Directories + subscriptions menu.
  3. In the left menu, select Azure AD B2C. Or, select All services and search for and select Azure AD B2C.
  4. Select User flows.
  5. Select the user flow for which you want to disable email verification. For example, B2C_1_signinsignup.
  6. To test your policy, select Run user flow.
  7. For Application, select the web application named testapp1 that you previously registered. The Reply URL should show https://jwt.ms.
  8. Click Run user flow
  9. You should be able to sign up using an email address without the validation.

Update and test the relying party file

  1. Sign in to the Azure portal.
  2. If you have access to multiple tenants, select the Settings icon in the top menu to switch to your Microsoft Entra ID tenant from the Directories + subscriptions menu.
  3. Choose All services in the top-left corner of the Azure portal, and then search for and select App registrations.
  4. Select Identity Experience Framework.
  5. Select Upload Custom Policy, and then upload the two policy files that you changed.
  6. Select the sign-up or sign-in policy that you uploaded, and click the Run now button.
  7. You should be able to sign up using an email address without the validation.

Next steps