Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix validation errors during upload SignUpOrSignin policy from SocialAndLocalAccountsWithMfa folder #144

Open
tanopaterno opened this issue Feb 1, 2023 · 1 comment

Comments

@tanopaterno
Copy link

tanopaterno commented Feb 1, 2023

During the upload of SignUpOrSignin.xml policy file from the SocialAndLocalAccountWithMfa folder, show me this validation errors:

upload-custom-policy-validation-errors

This validation errors occurred because in the LocalAccountSignUpWithLogonEmail TechnicalProfile of TrustFrameworkBase.xml are missing the alternativeSecurityId and identityProvider OutputClaims.

In this case, update the LocalAccountSignUpWithLogonEmail TechnicalProfile into TrustFrameworkBase.xml policy file with the following code:

<TechnicalProfile Id="LocalAccountSignUpWithLogonEmail">
          <DisplayName>Email signup</DisplayName>
          <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
          <Metadata>
            <Item Key="IpAddressClaimReferenceId">IpAddress</Item>
            <Item Key="ContentDefinitionReferenceId">api.localaccountsignup</Item>
          </Metadata>
          <CryptographicKeys>
            <Key Id="issuer_secret" StorageReferenceId="B2C_1A_TokenSigningKeyContainer" />
          </CryptographicKeys>
          <InputClaims>
            <InputClaim ClaimTypeReferenceId="email" />
          </InputClaims>
          <OutputClaims>
            <OutputClaim ClaimTypeReferenceId="objectId" />
            <OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="Verified.Email" Required="true" />
            <OutputClaim ClaimTypeReferenceId="newPassword" Required="true" />
            <OutputClaim ClaimTypeReferenceId="reenterPassword" Required="true" />
            <OutputClaim ClaimTypeReferenceId="executed-SelfAsserted-Input" DefaultValue="true" />
            <OutputClaim ClaimTypeReferenceId="authenticationSource" />
            <OutputClaim ClaimTypeReferenceId="newUser" />

            <!-- Optional claims, to be collected from the user -->
            <OutputClaim ClaimTypeReferenceId="displayName" />
            <OutputClaim ClaimTypeReferenceId="givenName" />
            <OutputClaim ClaimTypeReferenceId="surName" />

            <!-- OutputClaims added for resolve the validation errors -->
            <OutputClaim ClaimTypeReferenceId="alternativeSecurityId" />
            <OutputClaim ClaimTypeReferenceId="identityProvider" />

          </OutputClaims>
          <ValidationTechnicalProfiles>
            <ValidationTechnicalProfile ReferenceId="AAD-UserWriteUsingLogonEmail" />
          </ValidationTechnicalProfiles>
          <UseTechnicalProfileForSessionManagement ReferenceId="SM-AAD" />
        </TechnicalProfile>

After you update the TrustFrameworkBase.xml policy file, upload this with 'Overwrite the custom policy if it already exists' option checked and the next upload of SignUpOrSignIn.xml policy file not show the validation errors.

@nheath99
Copy link

nheath99 commented Mar 8, 2023

It was also necessary for me to add the following in the ClaimsSchema section:

<ClaimType Id="alternativeSecurityId">
  <DisplayName>alternativeSecurityId</DisplayName>
  <DataType>string</DataType>
  <UserHelpText />
</ClaimType>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants