B2C custom policy : Unable to see email address in clims after siginin

Vikas Tiwari 766 Reputation points
2022-02-16T14:46:28.977+00:00

Hi,

I am using username/password for user sign in (not email) through B2C custom policy, and want to pass email address as part of output claim. I have added following under Relying Party section but unable to see email inside claim values when user sign-in.

<RelyingParty>
    <DefaultUserJourney ReferenceId="SignUpOrSignInWithUsername" /> <!-- This policy is for the Login Process-->
    <UserJourneyBehaviors> 
    <ScriptExecution>Allow</ScriptExecution>
    </UserJourneyBehaviors>
    <TechnicalProfile Id="PolicyProfile">
      <DisplayName>PolicyProfile</DisplayName>
      <Protocol Name="OpenIdConnect" />
      <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="displayName" />
        <OutputClaim ClaimTypeReferenceId="givenName" />
        <OutputClaim ClaimTypeReferenceId="surname" />
        <OutputClaim ClaimTypeReferenceId="objectId" PartnerClaimType="sub"/>
        <OutputClaim ClaimTypeReferenceId="signinname" />
        <OutputClaim ClaimTypeReferenceId="tenantId" AlwaysUseDefaultValue="true" DefaultValue="{Policy:TenantObjectId}" />
        <OutputClaim ClaimTypeReferenceId="isForgotPassword" DefaultValue="false" />    <!-- Detect where user signed in using Forgot password flow-->
        <OutputClaim ClaimTypeReferenceId="identityProvider" />
        <OutputClaim ClaimTypeReferenceId="accountNumber" DefaultValue="12346" /> 
        <OutputClaim ClaimTypeReferenceId="email" />
        <OutputClaim ClaimTypeReferenceId="signInNamesInfo.emailAddress" PartnerClaimType="email"/>
        </OutputClaims>
      <SubjectNamingInfo ClaimType="sub" />
    </TechnicalProfile>
  </RelyingParty>
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,847 questions
{count} votes

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.