0

I am writing custom profile for azure AD b2c and using this starter kit.

I need to make some changes as when I run SignUpOrSignInWithPhone user journey it opens first input screen.

enter image description here

Here you can see we can provide valid number and click continue.

Then, it shows second screen like this:

enter image description here

Here it asking me to select different country or default and provide valid phone number:

I just want skip the first screen or replace the first screen and it should render screen first time with country dropdown and on validation I receive 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>

I commented the code which I tried to replace first screen with second one, but none is working as I need. Thanks in advance please do not make my question rejected. I am struggling for last 2 days.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135
  • What you want to do is actually skip all of Step 1+2 and go directly to Step 3 "SignInWithPhone". That subjourney is what causes you to see the second screenshot. Doing so will remove the ability to sign up and recover your account. – Jas Suri - MSFT Feb 27 '21 at 15:28

1 Answers1

0

You user journey should look like this

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

Comment-out/Remove this section in PhoneVerificationPage1 technical profile.

         <InputClaimsTransformations>
            <InputClaimsTransformation ReferenceId="GetNationalNumberAndCountryCodeIfInternationalFormat" />
            <InputClaimsTransformation ReferenceId="PhoneNumberToNationalNumber" />
            <InputClaimsTransformation ReferenceId="CreateRandomUPNUserName" />
            <InputClaimsTransformation ReferenceId="CreateUserPrincipalName" />
          </InputClaimsTransformations>
Jas Suri - MSFT
  • 10,605
  • 2
  • 10
  • 20