如何在组合的siginsignup中预填充电子邮件地址

时间:2019-06-27 13:39:53

标签: azure-ad-b2c

这是关于自定义策略注册用户旅程的参考。我有一个自我声明的编排步骤,该步骤会在组合的signupsignin编排步骤之前收集用户的电子邮件地址。我想在signupsignin步骤中填充电子邮件地址,但无法正常工作。

编排步骤

  <OrchestrationStep Order="1" Type="ClaimsExchange" ContentDefinitionReferenceId="api.selfasserted.email">
      <ClaimsExchanges>
        <ClaimsExchange Id="SelfAssertedEmailExchange" TechnicalProfileReferenceId="SelfAsserted-CollectEmailAddress-NoError" />
      </ClaimsExchanges>
    </OrchestrationStep>

    <!--calls Azure function GetEmailDomain to get user domain -->
    <OrchestrationStep Order="2" Type="ClaimsExchange">
      <ClaimsExchanges>
        <ClaimsExchange Id="EmailDomainExchange" TechnicalProfileReferenceId="REST-API-GetEmailDomain" />
      </ClaimsExchanges>
    </OrchestrationStep>

    <OrchestrationStep Order="3" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
      <Preconditions>
        <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
          <Value>emailDomain</Value>
          <Value>ourdomain.com</Value>
          <Action>SkipThisOrchestrationStep</Action>
        </Precondition>
      </Preconditions>
      <ClaimsProviderSelections>
        <ClaimsProviderSelection TargetClaimsExchangeId="RushEnterprisesExchange" />
        <ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninEmailExchange" />
      </ClaimsProviderSelections>
      <ClaimsExchanges>
        <ClaimsExchange Id="LocalAccountSigninEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" />
      </ClaimsExchanges>
    </OrchestrationStep>

1 个答案:

答案 0 :(得分:0)

假设将电子邮件声明定义为 SelfAsserted-CollectEmailAddress 技术档案中的输出声明,则还必须将其定义为的输入声明> SelfAsserted-LocalAccountSignin-Email 技术资料,以便登录名字段预先填写:

<TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email">
  <InputClaims>
    <InputClaim ClaimTypeReferenceId="email" PartnerClaimType="signInName" />
  </InputClaims>
</TechnicalProfile>