0

I created a custom policy in Azure B2c and used custom attributes.

However, custom attributes only enter the token when the user creates the account. When he logs in again, the custom attribute does not come in the token.

Below is my RelyingParty.

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

1 Answers1

1

Add extension_time as an output claim into the AAD-UserReadUsingObjectId technical profile.

Jas Suri - MSFT
  • 10,605
  • 2
  • 10
  • 20
  • You are right, I removed this Technical Profile because an error occurred and I understood that it was for social account logins. But now I followed your tip and put in the correct metadata and it worked perfectly, thanks. – Victor Moreira Dec 29 '20 at 13:22