Karikalan
Karikalan

Reputation: 167

How to resolve Azure B2C UI customization Schema Validation Error pls?

I've followed the exact steps mentioned in https://learn.microsoft.com/en-us/azure/active-directory-b2c/customize-ui-with-html?pivots=b2c-custom-policy#4-modify-the-extensions-file

Still, I am getting the below error when uploading the extension policy. Not sure, how to resolve this issue. Could someone pls help me with this? Thanks.

Validation failed: 1 validation error(s) found in policy "B2C_1A_TRUSTFRAMEWORKEXTENSIONS" of tenant "devxyz.onmicrosoft.com".Schema validation error found at line 52 col 48 in policy "B2C_1A_TRUSTFRAMEWORKEXTENSIONS" of tenant "devxyz.onmicrosoft.com": The element 'ContentDefinition' in namespace 'http://schemas.microsoft.com/online/cpim/schemas/2013/06' cannot contain text. List of possible elements expected: 'LoadUri, RecoveryUri, DataUri, Metadata, LocalizedResourcesReferences' in namespace 'http://schemas.microsoft.com/online/cpim/schemas/2013/06'.Schema validation error found at line 52 col 48 in policy "B2C_1A_TRUSTFRAMEWORKEXTENSIONS" of tenant "devxyz.onmicrosoft.com": The element 'ContentDefinition' in namespace 'http://schemas.microsoft.com/online/cpim/schemas/2013/06' cannot contain text. List of possible elements expected: 'LoadUri, RecoveryUri, DataUri, Metadata, LocalizedResourcesReferences' in namespace 'http://schemas.microsoft.com/online/cpim/schemas/2013/06'.

Extension file building block section content as shown below,

<BuildingBlocks>
<ClaimsTransformations>
  <ClaimsTransformation Id="CreateRandomPassword" TransformationMethod="CreateRandomString">
    <InputParameters>
      <InputParameter Id="randomGeneratorType" DataType="string" Value="GUID" />
    </InputParameters>
    <OutputClaims>
      <OutputClaim ClaimTypeReferenceId="newPassword" TransformationClaimType="outputClaim" />
    </OutputClaims>
  </ClaimsTransformation>
</ClaimsTransformations>

<ContentDefinitions>
<ContentDefinition Id="api.error">
  <LoadUri>~/tenant/templates/AzureBlue/exception.cshtml</LoadUri>
  <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
  <DataUri>urn:com:microsoft:aad:b2c:elements:contract:globalexception:1.2.1</DataUri>
  <Metadata>
    <Item Key="DisplayName">Error page</Item>
  </Metadata>
</ContentDefinition>
<ContentDefinition Id="api.idpselections">
  <LoadUri>~/tenant/templates/AzureBlue/idpSelector.cshtml</LoadUri>
  <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
  <DataUri>urn:com:microsoft:aad:b2c:elements:contract:providerselection:1.2.1</DataUri>
  <Metadata>
    <Item Key="DisplayName">Idp selection page</Item>
    <Item Key="language.intro">Sign in</Item>
  </Metadata>
</ContentDefinition>
<ContentDefinition Id="api.idpselections.signup">
  <LoadUri>~/tenant/templates/AzureBlue/idpSelector.cshtml</LoadUri>
  <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
  <DataUri>urn:com:microsoft:aad:b2c:elements:contract:providerselection:1.2.1</DataUri>
  <Metadata>
    <Item Key="DisplayName">Idp selection page</Item>
    <Item Key="language.intro">Sign up</Item>
  </Metadata>
</ContentDefinition>
<ContentDefinition Id="api.signuporsignin">
  <LoadUri>~/tenant/templates/AzureBlue/unified.cshtml</LoadUri>
  <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
  <DataUri>urn:com:microsoft:aad:b2c:elements:contract:unifiedssp:2.1.5</DataUri>
  <Metadata>
    <Item Key="DisplayName">Signin and Signup</Item>
  </Metadata>
</ContentDefinition>
<ContentDefinition Id="api.selfasserted">s
  <LoadUri>https://myosssostg.blob.core.windows.net/devxyz-osssob2c/selfAsserted.html</LoadUri>
  <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
  <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:2.1.7</DataUri>
  <Metadata>
    <Item Key="DisplayName">Collect information from user page</Item>
  </Metadata>
</ContentDefinition>
<ContentDefinition Id="api.selfasserted.profileupdate">
  <LoadUri>~/tenant/templates/AzureBlue/selfAsserted.cshtml</LoadUri>
  <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
  <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:2.1.7</DataUri>
  <Metadata>
    <Item Key="DisplayName">Collect information from user page</Item>
  </Metadata>
</ContentDefinition>
<ContentDefinition Id="api.localaccountsignup">
  <LoadUri>~/tenant/templates/AzureBlue/selfAsserted.cshtml</LoadUri>
  <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
  <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:2.1.7</DataUri>
  <Metadata>
    <Item Key="DisplayName">Local account sign up page</Item>
  </Metadata>
</ContentDefinition>
<ContentDefinition Id="api.localaccountpasswordreset">
  <LoadUri>~/tenant/templates/AzureBlue/selfAsserted.cshtml</LoadUri>
  <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
  <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:2.1.7</DataUri>
  <Metadata>
    <Item Key="DisplayName">Local account change password page</Item>
  </Metadata>
</ContentDefinition>
<ContentDefinition Id="api.socialccountsignup">
  <LoadUri>~/tenant/templates/AzureBlue/selfAsserted.cshtml</LoadUri>
  <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
  <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:2.1.7</DataUri>
  <Metadata>
    <Item Key="DisplayName">Collect information from user page</Item>
  </Metadata>
</ContentDefinition>
<ContentDefinition Id="api.localaccountsignin">
  <LoadUri>~/tenant/templates/AzureBlue/selfAsserted.cshtml</LoadUri>
  <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
  <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:2.1.7</DataUri>
  <Metadata>
    <Item Key="DisplayName">Collect information from user page</Item>
  </Metadata>
</ContentDefinition>

Upvotes: 1

Views: 869

Answers (1)

rbrayb
rbrayb

Reputation: 46720

There is an extra "s":

<ContentDefinition Id="api.selfasserted">s

Upvotes: 3

Related Questions