B2C custom policy : Unable to see email address in clims after siginin
Vikas Tiwari
766
Reputation points
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>
Sign in to answer