How do i include email in the redirect to AZURE AD B2C

后端 未结 1 429
猫巷女王i
猫巷女王i 2020-12-19 18:28

I have set up an Azure B2C tenant and used custom policies to add azure ad as an IDP so that users can sign up with their domain accounts. I can build a custom page where as

相关标签:
1条回答
  • 2020-12-19 18:42

    For a custom policy, if you add the "login_hint" query string parameter to the OpenID Connect authentication request, then you can default the login field to this login hint by adding the "DefaultValue" attribute to the "signInName" input claim for the "SelfAsserted-LocalAccountSignin-Email" technical profile as follows:

    <TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email">
      <DisplayName>Local Account Signin</DisplayName>
      ...
      <InputClaims>
        <InputClaim ClaimTypeReferenceId="signInName" DefaultValue="{OIDC:LoginHint}" />
      </InputClaims>
      <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="signInName" Required="true" />
        ...
      </OutputClaims>
      ...
    </TechnicalProfile>
    

    The "DefaultValue" attribute references a claims resolver that sets the "signInName" claim type to the "login_hint" parameter of the OpenID Connect authentication request.

    See the Set up direct sign-in using Azure Active Directory B2C article for more information about passing the "login_hint" query string parameter.

    0 讨论(0)
提交回复
热议问题