2

I have set up custom policies for Azure AD B2C using the LocalAndSocialAccount starter pack. I am trying to remove the display name from the sign up UI. I have read previously that this can be accomplished simply by removing <OutputClaim ClaimTypeReferenceId="displayName" /> in the LocalAccountSignUpWithLogonEmail technical profile.

However this does not seem to work for me. Can anyone offer any insight on any fixes?

My TrustFrameworkExtensions.xml:

<ClaimsProvider>
      <DisplayName>Local Account</DisplayName>
      <TechnicalProfiles>
        <!--Local account sign-up page-->
        <TechnicalProfile Id="LocalAccountSignUpWithLogonEmail">
          <OutputClaims>
          <OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="Verified.Email" Required="true" />
          <OutputClaim ClaimTypeReferenceId="newPassword" Required="true" />
          <OutputClaim ClaimTypeReferenceId="reenterPassword" Required="true" />
          <OutputClaim ClaimTypeReferenceId="givenName" />
          <OutputClaim ClaimTypeReferenceId="surName" />
          <OutputClaim ClaimTypeReferenceId="dateOfBirth" />
          <OutputClaim ClaimTypeReferenceId="verificationCode"/>
        </OutputClaims>
      </TechnicalProfile>
      </TechnicalProfiles>
</ClaimsProvider>

My SignUporSignIn.xml:

<RelyingParty>
    <DefaultUserJourney ReferenceId="SignUpOrSignIn" />
    <TechnicalProfile Id="PolicyProfile">
      <DisplayName>PolicyProfile</DisplayName>
      <Protocol Name="OpenIdConnect" />
      <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="givenName" />
        <OutputClaim ClaimTypeReferenceId="surname" />
        <OutputClaim ClaimTypeReferenceId="email" />
        <OutputClaim ClaimTypeReferenceId="verificationCode" DefaultValue=""/>
        <OutputClaim ClaimTypeReferenceId="dateOfBirth" />
        <OutputClaim ClaimTypeReferenceId="objectId" PartnerClaimType="sub"/>
        <OutputClaim ClaimTypeReferenceId="tenantId" AlwaysUseDefaultValue="true" DefaultValue="{Policy:TenantObjectId}" />

      </OutputClaims>
      <SubjectNamingInfo ClaimType="sub" />
    </TechnicalProfile>
</RelyingParty>
avelez26
  • 21
  • 1

2 Answers2

1

You need to remove it in your base

In the file TrustFrameworkBase.xml at lines 631

<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>
  <ValidationTechnicalProfiles>
    <ValidationTechnicalProfile ReferenceId="AAD-UserWriteUsingLogonEmail" />
  </ValidationTechnicalProfiles>
  <UseTechnicalProfileForSessionManagement ReferenceId="SM-AAD" />
</TechnicalProfile>

You must remove the line <OutputClaim ClaimTypeReferenceId="displayName" />

Joyescat
  • 507
  • 5
  • 11
0

It’s because your technical profile is merged with the “base” files of this file. So since it exists in base, its not working. Either change your technical profile id so that it’s not merging with the one in the base file, or delete the output claim in the base file.

Jas Suri - MSFT
  • 10,605
  • 2
  • 10
  • 20
  • Thanks for the reply. I tried both of what you suggested but it didn't work. By base files, do you mean the TrustFrameworkBase.xml file? I got exceptions when trying to modify that. Changing the id also didn't work. Can you please provide an example of this? – avelez26 Oct 30 '20 at 14:34