spottedmahn
spottedmahn

Reputation: 15981

Howto Enable Email Verification in Azure AD B2C

How do I enable email verification in B2C w/ custom policies?

In an attempt to reverse engineer it, I tried disabling it in a built-in policy and downloaded the policy. I tried adding that metadata item to my self-asserted technical profile but that didn't work.

Reverse Engineer Test | Built-In Policy

<TechnicalProfile Id="SelfAsserted-Input">
  <Metadata>
    <Item Key="EnforceEmailVerification">False</Item>
  </Metadata>
</TechnicalProfile>

My Self-Asserted Technical Profile

<TechnicalProfile Id="LocalAccountSignUp">
    <DisplayName>User signup</DisplayName>
    <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <Metadata>
        <Item Key="EnforceEmailVerification">True</Item>
    </Metadata>
    ...
</TechnicalProfile>

I'm using usernames for local accounts incase that matters.

Upvotes: 3

Views: 3300

Answers (1)

Chris Padgett
Chris Padgett

Reputation: 14634

Whether a local account is created with an email address- or user name-based sign-in name, you add email verification by adding PartnerClaimType="Verified.Email" to the "email" output claim of your self-asserted technical profile, as follows:

<OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="Verified.Email" Required="true" />

Upvotes: 4

Related Questions