Howto Enable Email Verification in Azure AD B2C

人走茶凉 提交于 2021-02-10 06:56:16

问题


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.


回答1:


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" />


来源:https://stackoverflow.com/questions/49574334/howto-enable-email-verification-in-azure-ad-b2c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!