AD B2C policy error There is a duplicate key sequence

David Wong 46 Reputation points
2023-06-16T15:55:54.5233333+00:00

I was following this page to migrate to “Self-service password reset” flow. I added a technical profile as this step

When I upload the policy, I get the following error:

Validation failed: 1 validation error(s) found in policy "B2C_1A_TRUSTFRAMEWORKEXTENSIONS" of tenant xxxx. Schema validation error found at line 1605 col 10 in policy "B2C_1A_TRUSTFRAMEWORKEXTENSIONS" of xxxx.There is a duplicate key sequence 'LocalAccountWritePasswordUsingObjectId' for the 'http://schemas.microsoft.com/online/cpim/schemas/2013/06:UniqueTechnicalProfileId' key or unique identity constraint.Schema validation error found at line 1605 col 10 in policy "B2C_1A_TRUSTFRAMEWORKEXTENSIONS" of tenant xxxx: There is a duplicate key sequence 'LocalAccountWritePasswordUsingObjectId' for the 'http://schemas.microsoft.com/online/cpim/schemas/2013/06:UniqueTechnicalProfileId' key or unique identity constraint.

Not sure if it was related to another already exist ClaimProvider in the same policy or

<ClaimsProvider>
….
      </TechnicalProfile>
        <TechnicalProfile Id="LocalAccountWritePasswordUsingObjectId">
          <Metadata>
            <Item Key="setting.showCancelButton">false</Item>
…
Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Akshay-MSFT 17,956 Reputation points Microsoft Employee Moderator
    2023-06-27T11:48:10.9433333+00:00

    @David Wong

    Thank you for sharing the files. I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue: Uploading B2C_1A_TRUSTFRAMEWORKEXTENSIONS fails with error

    There is a duplicate key sequence 'LocalAccountWritePasswordUsingObjectId' for the 'http://schemas.microsoft.com/online/cpim/schemas/2013/06:UniqueTechnicalProfileId' key or unique identity constraint.Schema validation error found at line 1605 col 10 in policy "B2C_1A_TRUSTFRAMEWORKEXTENSIONS" of tenant xxxx: There is a duplicate key sequence 'LocalAccountWritePasswordUsingObjectId' for the 'http://schemas.microsoft.com/online/cpim/schemas/2013/06:UniqueTechnicalProfileId' key or unique identity constraint.

    Cause:

    B2C_1A_TRUSTFRAMEWORKEXTENSIONS.xml already had a ClaimsProvider with <DisplayName>Local Account SignIn</DisplayName> that handled local account and got the <TechnicalProfile Id="LocalAccountWritePasswordUsingObjectId">

    Solution:

    1. Adding the <TechnicalProfile Id="ForgotPassword"> and <TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email">
    2. Updated the <TechnicalProfile Id="LocalAccountWritePasswordUsingObjectId">

    Thanks,

    Akshay Kaushik

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.