|
2 | 2 | xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
3 | 3 | xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06" PolicySchemaVersion="0.3.0.0"
|
4 | 4 | TenantId="yourtenant.onmicrosoft.com"
|
5 |
| - PolicyId="B2C_1A_TrustFrameworkExtensions_TOTP" |
6 |
| - PublicPolicyUri="http://yourtenant.onmicrosoft.com/B2C_1A_TrustFrameworkExtensions_TOTP"> |
| 5 | + PolicyId="B2C_1A_TOTP_Extensions" |
| 6 | + PublicPolicyUri="http://yourtenant.onmicrosoft.com/B2C_1A_TOTP_Extensions"> |
7 | 7 |
|
8 | 8 | <BasePolicy>
|
9 | 9 | <TenantId>yourtenant.onmicrosoft.com</TenantId>
|
10 | 10 | <PolicyId>B2C_1A_TrustFrameworkExtensions</PolicyId>
|
11 | 11 | </BasePolicy>
|
12 | 12 | <BuildingBlocks>
|
13 | 13 | <ClaimsSchema>
|
14 |
| - <!--TOTP |
15 |
| - claims--> |
16 | 14 | <ClaimType Id="emails">
|
17 | 15 | <DisplayName>Email Addresses</DisplayName>
|
18 | 16 | <DataType>stringCollection</DataType>
|
|
49 | 47 | </ClaimType>
|
50 | 48 |
|
51 | 49 | <ClaimType Id="QrCodeVerifyInstruction">
|
52 |
| - <DisplayName>Enter the verification code from your authenticator app.</DisplayName> |
| 50 | + <DisplayName>Enter the code from District Manager.</DisplayName> |
53 | 51 | <DataType>string</DataType>
|
54 | 52 | <UserInputType>Paragraph</UserInputType>
|
55 | 53 | </ClaimType>
|
|
69 | 67 | </ClaimType>
|
70 | 68 |
|
71 | 69 | <ClaimType Id="otpCode">
|
72 |
| - <DisplayName>Enter your code</DisplayName> |
| 70 | + <DisplayName>Enter the code</DisplayName> |
73 | 71 | <DataType>string</DataType>
|
74 | 72 | <UserHelpText>Enter the 6-digit verification code generated by the the Authenticator
|
75 | 73 | app in the box</UserHelpText>
|
|
241 | 239 |
|
242 | 240 | <!-- end of TOTP Claims Transforms-->
|
243 | 241 |
|
| 242 | + <ClaimsTransformation Id="CreateRandomPassword" TransformationMethod="CreateRandomString"> |
| 243 | + <InputParameters> |
| 244 | + <InputParameter Id="randomGeneratorType" DataType="string" Value="GUID" /> |
| 245 | + </InputParameters> |
| 246 | + <OutputClaims> |
| 247 | + <OutputClaim ClaimTypeReferenceId="password" TransformationClaimType="outputClaim" /> |
| 248 | + </OutputClaims> |
| 249 | + </ClaimsTransformation> |
| 250 | + |
244 | 251 | </ClaimsTransformations>
|
245 | 252 |
|
246 | 253 | <ContentDefinitions>
|
|
296 | 303 | StringId="DisplayName">Enter the verification code from your authenticator
|
297 | 304 | app.</LocalizedString>
|
298 | 305 | <LocalizedString ElementType="ClaimType" ElementId="otpCode"
|
299 |
| - StringId="DisplayName">Enter your code.</LocalizedString> |
| 306 | + StringId="DisplayName">Enter the code.</LocalizedString> |
300 | 307 | <!-- <LocalizedString ElementType="UxElement"
|
301 | 308 | StringId="button_continue">Verify</LocalizedString> -->
|
302 | 309 | </LocalizedStrings>
|
|
573 | 580 | <OutputClaim ClaimTypeReferenceId="userPrincipalName" />
|
574 | 581 | </OutputClaims>
|
575 | 582 | </TechnicalProfile>
|
| 583 | + <TechnicalProfile Id="AAD-UserWriteUsingAlternativeSecurityId"> |
| 584 | + <InputClaimsTransformations> |
| 585 | + <InputClaimsTransformation ReferenceId="CreateRandomPassword" /> |
| 586 | + </InputClaimsTransformations> |
| 587 | + <!-- <InputClaims> |
| 588 | + <InputClaim ClaimTypeReferenceId="email" Required="true" /> |
| 589 | + </InputClaims> --> |
| 590 | + <PersistedClaims> |
| 591 | + <PersistedClaim ClaimTypeReferenceId="email" PartnerClaimType="signInNames.emailAddress" /> |
| 592 | + <PersistedClaim ClaimTypeReferenceId="password" /> |
| 593 | + <PersistedClaim ClaimTypeReferenceId="passwordPolicies" DefaultValue="DisablePasswordExpiration,DisableStrongPassword" /> |
| 594 | + </PersistedClaims> |
| 595 | + </TechnicalProfile> |
576 | 596 | </TechnicalProfiles>
|
577 | 597 | </ClaimsProvider>
|
578 | 598 |
|
579 |
| - <ClaimsProvider> |
580 |
| - <DisplayName>Local Account</DisplayName> |
581 |
| - <TechnicalProfiles> |
582 |
| - <TechnicalProfile Id="LocalAccountSignUpWithLogonEmail"> |
583 |
| - <OutputClaims> |
584 |
| - <!-- The userPrincipalName is required for the AzureMfaProtocolProvider |
585 |
| - technical profiles--> |
586 |
| - <OutputClaim ClaimTypeReferenceId="userPrincipalName" /> |
587 |
| - </OutputClaims> |
588 |
| - </TechnicalProfile> |
589 |
| - |
590 |
| - <TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email"> |
591 |
| - <OutputClaims> |
592 |
| - <!-- The userPrincipalName is required for the AzureMfaProtocolProvider |
593 |
| - technical profiles--> |
594 |
| - <OutputClaim ClaimTypeReferenceId="userPrincipalName" /> |
595 |
| - </OutputClaims> |
596 |
| - </TechnicalProfile> |
597 |
| - </TechnicalProfiles> |
598 |
| - </ClaimsProvider> |
599 | 599 | </ClaimsProviders>
|
600 | 600 |
|
601 | 601 | <UserJourneys>
|
602 |
| - <UserJourney Id="PasswordResetWithTOTP"> |
603 |
| - <OrchestrationSteps> |
604 |
| - <OrchestrationStep Order="1" Type="ClaimsExchange"> |
605 |
| - <ClaimsExchanges> |
606 |
| - <ClaimsExchange Id="PasswordResetUsingEmailAddressExchange" |
607 |
| - TechnicalProfileReferenceId="LocalAccountDiscoveryUsingEmailAddress" /> |
608 |
| - </ClaimsExchanges> |
609 |
| - </OrchestrationStep> |
610 |
| - |
611 |
| - <!-- Call the TOTP enrollment ub journey. If user already enrolled the sub journey |
612 |
| - will not ask the user to enroll --> |
613 |
| - <OrchestrationStep Order="2" Type="InvokeSubJourney"> |
614 |
| - <JourneyList> |
615 |
| - <Candidate SubJourneyReferenceId="TotpFactor-Input" /> |
616 |
| - </JourneyList> |
617 |
| - </OrchestrationStep> |
618 |
| - |
619 |
| - <!-- Call the TOTP validation sub journey--> |
620 |
| - <OrchestrationStep Order="3" Type="InvokeSubJourney"> |
621 |
| - <JourneyList> |
622 |
| - <Candidate SubJourneyReferenceId="TotpFactor-Verify" /> |
623 |
| - </JourneyList> |
624 |
| - </OrchestrationStep> |
625 |
| - |
626 |
| - <OrchestrationStep Order="4" Type="ClaimsExchange"> |
627 |
| - <ClaimsExchanges> |
628 |
| - <ClaimsExchange Id="NewCredentials" |
629 |
| - TechnicalProfileReferenceId="LocalAccountWritePasswordUsingObjectId" /> |
630 |
| - </ClaimsExchanges> |
631 |
| - </OrchestrationStep> |
632 |
| - |
633 |
| - <OrchestrationStep Order="5" Type="SendClaims" |
634 |
| - CpimIssuerTechnicalProfileReferenceId="JwtIssuer" /> |
635 |
| - </OrchestrationSteps> |
636 |
| - <ClientDefinition ReferenceId="DefaultWeb" /> |
637 |
| - </UserJourney> |
638 | 602 |
|
639 | 603 | <UserJourney Id="SignUpOrSignInTOTP">
|
640 | 604 | <OrchestrationSteps>
|
641 |
| - |
642 | 605 | <OrchestrationStep Order="1" Type="CombinedSignInAndSignUp"
|
643 | 606 | ContentDefinitionReferenceId="api.signuporsignin">
|
644 | 607 | <ClaimsProviderSelections>
|
645 |
| - <ClaimsProviderSelection |
646 |
| - ValidationClaimsExchangeId="LocalAccountSigninEmailExchange" /> |
| 608 | + <ClaimsProviderSelection TargetClaimsExchangeId="WORKExchange" /> |
647 | 609 | </ClaimsProviderSelections>
|
| 610 | + </OrchestrationStep> |
| 611 | + <OrchestrationStep Order="2" Type="ClaimsExchange"> |
648 | 612 | <ClaimsExchanges>
|
649 |
| - <ClaimsExchange Id="LocalAccountSigninEmailExchange" |
650 |
| - TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" /> |
| 613 | + <ClaimsExchange Id="WORKExchange" TechnicalProfileReferenceId="WORK-OIDC" /> |
651 | 614 | </ClaimsExchanges>
|
652 | 615 | </OrchestrationStep>
|
653 | 616 |
|
654 |
| - <OrchestrationStep Order="2" Type="ClaimsExchange"> |
| 617 | + <!-- For social IDP authentication, attempt to find the user account in the |
| 618 | + directory. --> |
| 619 | + <OrchestrationStep Order="3" Type="ClaimsExchange"> |
| 620 | + <ClaimsExchanges> |
| 621 | + <ClaimsExchange Id="AADUserReadUsingAlternativeSecurityId" |
| 622 | + TechnicalProfileReferenceId="AAD-UserReadUsingAlternativeSecurityId-NoError" /> |
| 623 | + </ClaimsExchanges> |
| 624 | + </OrchestrationStep> |
| 625 | + |
| 626 | + <!-- The previous step (SelfAsserted-Social) could have been skipped if there were |
| 627 | + no attributes to collect |
| 628 | + from the user. So, in that case, create the user in the directory if one does not already exist |
| 629 | + (verified using objectId which would be set from the last step if account was created in the |
| 630 | + directory. --> |
| 631 | + <OrchestrationStep Order="4" Type="ClaimsExchange"> |
655 | 632 | <Preconditions>
|
656 | 633 | <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
|
657 | 634 | <Value>objectId</Value>
|
658 | 635 | <Action>SkipThisOrchestrationStep</Action>
|
659 | 636 | </Precondition>
|
660 | 637 | </Preconditions>
|
661 | 638 | <ClaimsExchanges>
|
662 |
| - <ClaimsExchange Id="SignUpWithLogonEmailExchange" |
663 |
| - TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" /> |
| 639 | + <ClaimsExchange Id="AADUserWrite" |
| 640 | + TechnicalProfileReferenceId="AAD-UserWriteUsingAlternativeSecurityId" /> |
664 | 641 | </ClaimsExchanges>
|
665 | 642 | </OrchestrationStep>
|
666 | 643 |
|
667 |
| - <OrchestrationStep Order="3" Type="ClaimsExchange"> |
668 |
| - <ClaimsExchanges> |
669 |
| - <ClaimsExchange Id="AADUserReadWithObjectId" |
670 |
| - TechnicalProfileReferenceId="AAD-UserReadUsingObjectId" /> |
671 |
| - </ClaimsExchanges> |
672 |
| - </OrchestrationStep> |
673 |
| - |
674 |
| - <!-- Call the TOTP enrollment ub journey. If user already enrolled the sub journey |
675 |
| - will not ask the user to enroll --> |
676 |
| - <OrchestrationStep Order="4" Type="InvokeSubJourney"> |
| 644 | + <OrchestrationStep Order="5" Type="InvokeSubJourney"> |
677 | 645 | <JourneyList>
|
678 | 646 | <Candidate SubJourneyReferenceId="TotpFactor-Input" />
|
679 | 647 | </JourneyList>
|
680 | 648 | </OrchestrationStep>
|
681 | 649 |
|
682 |
| - <!-- Call the TOTP validation sub journey--> |
683 |
| - <OrchestrationStep Order="5" Type="InvokeSubJourney"> |
| 650 | + <OrchestrationStep Order="6" Type="InvokeSubJourney"> |
684 | 651 | <JourneyList>
|
685 | 652 | <Candidate SubJourneyReferenceId="TotpFactor-Verify" />
|
686 | 653 | </JourneyList>
|
687 | 654 | </OrchestrationStep>
|
688 | 655 |
|
689 |
| - <OrchestrationStep Order="6" Type="SendClaims" |
| 656 | + <OrchestrationStep Order="7" Type="SendClaims" |
690 | 657 | CpimIssuerTechnicalProfileReferenceId="JwtIssuer" />
|
691 | 658 |
|
692 | 659 | </OrchestrationSteps>
|
|
0 commit comments