Hi @Admin • Thank you for reaching out.
The reason for the displayName being set as Unknown, even after adding the Claims Transformation, is because Validation Technical Profile runs before OutputClaimTransformation. When signing up via email for the Local User account, LocalAccountSignUpWithLogonEmail
technical profile is used. This technical profile includes AAD-UserWriteUsingLogonEmail
technical profile as the validation technical profile. If you check AAD-UserWriteUsingLogonEmail
technical profile, you can see <PersistedClaim ClaimTypeReferenceId="displayName" DefaultValue="unknown"/>
. Since the validation technical profile runs before OutputClaimTransformation, you are getting the DefaultVaue of unknown.
Please follow the below steps to get displayName by joining givenName + surname of the user.
- Create below Claims Transformation:
<ClaimsTransformation Id="CreateDisplayNameFromFirstNameAndLastName" TransformationMethod="FormatStringMultipleClaims"> <InputClaims> <InputClaim ClaimTypeReferenceId="givenName" TransformationClaimType="inputClaim1" /> <InputClaim ClaimTypeReferenceId="surName" TransformationClaimType="inputClaim2" /> </InputClaims> <InputParameters> <InputParameter Id="stringFormat" DataType="string" Value="{0} {1}" /> </InputParameters> <OutputClaims> <OutputClaim ClaimTypeReferenceId="displayName" TransformationClaimType="outputClaim" /> </OutputClaims> </ClaimsTransformation>
- Add below Technical Profile:
<TechnicalProfile Id="Validate-DisplayName"> <DisplayName>Validate displayName</DisplayName> <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.ClaimsTransformationProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /> <InputClaims> <InputClaim ClaimTypeReferenceId="displayName" /> </InputClaims> <OutputClaims> <OutputClaim ClaimTypeReferenceId="displayName" /> </OutputClaims> <OutputClaimsTransformations> <OutputClaimsTransformation ReferenceId="CreateDisplayNameFromFirstNameAndLastName" /> </OutputClaimsTransformations> <UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" /> </TechnicalProfile>
- Add Validate-DisplayName technical profile as validation technical profile under LocalAccountSignUpWithLogonEmail technical profile as mentioned below (in same order):
<ValidationTechnicalProfiles> <ValidationTechnicalProfile ReferenceId="Validate-DisplayName" /> <ValidationTechnicalProfile ReferenceId="AAD-UserWriteUsingLogonEmail" /> </ValidationTechnicalProfiles>
-----------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.