【问题标题】:azure ad b2c mfa passwordless authentication technical profile merge screensazure ad b2c mfa 无密码身份验证技术配置文件合并屏幕
【发布时间】:2021-02-25 08:23:29
【问题描述】:

我正在为 azure AD b2c 编写自定义配置文件并使用 this 入门套件。

我需要进行一些更改,因为当我运行 SignUpOrSignInWithPhone 用户旅程时,它会打开第一个输入屏幕。

在这里你可以看到我们可以提供有效的号码并点击继续。

然后,它显示第二个屏幕,如下所示:

这里要求我选择不同的国家或默认国家并提供有效的电话号码:

我只想跳过第一个屏幕或替换第一个屏幕,它应该在第一次呈现屏幕时使用国家/地区下拉菜单,并且在验证时我会收到 OTP。

<UserJourney Id="SignUpOrSignInWithPhone">
  <OrchestrationSteps>
    <OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="signuporsignin-phone">
      <ClaimsProviderSelections>
        <ClaimsProviderSelection TargetClaimsExchangeId="SignUpWithPhone" />
        <ClaimsProviderSelection TargetClaimsExchangeId="ChangePhoneNumber" />
        <ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninPhoneExchange" />
      </ClaimsProviderSelections>
      <ClaimsExchanges>
        <!-- <ClaimsExchange Id="LocalAccountSigninPhoneExchange" TechnicalProfileReferenceId="PhoneInputPage-ChangePhoneNumberPolicy" /> -->
        <!-- <ClaimsExchange Id="ChangePhoneNumber" TechnicalProfileReferenceId="PhoneInputPage-ChangePhoneNumberClaimsProviderSelection" /> -->
        <ClaimsExchange Id="LocalAccountSigninPhoneExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Phone-Only" />
        <!-- <ClaimsExchange Id="LocalAccountSigninPhoneExchange" TechnicalProfileReferenceId="AAD-UserDiscoveryUsingLogonPhoneNumber-Common" /> -->
      </ClaimsExchanges>
    </OrchestrationStep>
    <OrchestrationStep Order="2" Type="ClaimsExchange">
      <Preconditions>
        <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
          <Value>isLocalAccountSignIn</Value>
          <Action>SkipThisOrchestrationStep</Action>
        </Precondition>
      </Preconditions>
      <ClaimsExchanges>
        <ClaimsExchange Id="SignUpWithPhone" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonPhoneNumber" />
        <ClaimsExchange Id="ChangePhoneNumber" TechnicalProfileReferenceId="PhoneInputPage-ChangePhoneNumberClaimsProviderSelection" />
      </ClaimsExchanges>
    </OrchestrationStep>

我评论了我试图用第二个屏幕替换第一个屏幕的代码,但没有一个按我的需要工作。 在此先感谢,请不要拒绝我的问题。我最近两天都在挣扎。

【问题讨论】:

  • 您实际上要做的是跳过所有第1+2步,直接进入第3步“SignInWithPhone”。那个 subjourney 是导致您看到第二个屏幕截图的原因。这样做将取消注册和恢复您的帐户的能力。

标签: azure azure-active-directory azure-ad-b2c azure-ad-b2c-custom-policy


【解决方案1】:

你的用户旅程应该是这样的

    <UserJourney Id="SignUpOrSignInWithPhone">
      <OrchestrationSteps>
        <OrchestrationStep Order="1" Type="InvokeSubJourney">
          <JourneyList>
            <Candidate SubJourneyReferenceId="SignInWithPhone" />
          </JourneyList>
        </OrchestrationStep>
        <OrchestrationStep Order="2" Type="InvokeSubJourney">
          <Preconditions>
            <Precondition Type="ClaimsExist" ExecuteActionsIf="false">
              <Value>isChangePhoneNumber</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <JourneyList>
            <Candidate SubJourneyReferenceId="ChangePhoneNumber" />
          </JourneyList>
        </OrchestrationStep>
        <OrchestrationStep Order="3" Type="ClaimsExchange">
          <Preconditions>
            <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
              <Value>hasFullProfile</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <ClaimsExchanges>
            <ClaimsExchange Id="AADUserReadWithObjectId" TechnicalProfileReferenceId="AAD-UserReadUsingObjectId" />
          </ClaimsExchanges>
        </OrchestrationStep>
        <OrchestrationStep Order="4" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" />
      </OrchestrationSteps>
      <ClientDefinition ReferenceId="DefaultWeb" />
    </UserJourney>

PhoneVerificationPage1 技术简介中注释/删除此部分。

         <InputClaimsTransformations>
            <InputClaimsTransformation ReferenceId="GetNationalNumberAndCountryCodeIfInternationalFormat" />
            <InputClaimsTransformation ReferenceId="PhoneNumberToNationalNumber" />
            <InputClaimsTransformation ReferenceId="CreateRandomUPNUserName" />
            <InputClaimsTransformation ReferenceId="CreateUserPrincipalName" />
          </InputClaimsTransformations>

【讨论】:

  • 感谢@Jas Suri - MSFT,但我看不到现在注册和更改电话号码链接。
猜你喜欢
  • 1970-01-01
  • 2016-12-07
  • 2016-05-06
  • 2019-06-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-07-11
  • 1970-01-01
相关资源
最近更新 更多