Entra External ID: Impossible to implement displayName=givenName+surname?

Martin Dreßler 25 Reputation points
2023-12-06T09:51:03.0666667+00:00

I have a very simple use case in Microsoft Entra External ID for Customers which seems to be impossible to implement:
I want to automatically fill the displayName user-attribute on signup submit.

On signup, the users email-address, givenName and surname user-attributes get collected. But this creates a new user account with displayName "unknown", so that all users are listed as "unknown" in the user-list on entra.microsoft.com.
Therefore I wanted to automatically set the displayName as concatenation of givenName+surname via a custom authentication extension.

It seems impossible to implement this use case because:

  • custom authentication extensions cannot add user-attributes which were not listed in the user-attributes-collection-UI or have not been filled with a value in the UI.
  • if I add the displayName user-attribute to the collection-UI, then I cannot hide it with CSS from the user, because the custom-CSS supports only very specific CSS selectors and I cannot add own CSS selectors to hide a field.

I do not want to bother the user with filling manually all 3 fields (givenName,. surname, displayName) and I want the displayName to be consistent with givenName+surname.

Is there a way to implement this fairly simple use case of automatically filling the displayName field?

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,740 questions
{count} vote

Accepted answer
  1. Marilee Turscak-MSFT 36,151 Reputation points Microsoft Employee
    2023-12-07T00:45:50.8033333+00:00

    @Martin Dreßler ,

    You are correct that you cannot concatenate the claims in a built-in user flow in Microsoft Entra External ID. There isn't an easy way to configure defaults for some attributes since different customers will want different experiences. You can request this feature in the UserVoice. I have also created an internal design change request to pass this feedback to the engineering team since this has also been requested in the past.

    You would need to either force the users to explicitly provide the value or add some custom code that updates these attributes.

    This can also be done using custom policies in B2C.

    
    <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 >
    

    See also: https://learn.microsoft.com/en-us/answers/questions/713037/display-the-name-of-user-in-ad-b2c-instead-of-unkn

    https://stackoverflow.com/questions/65213632/how-to-generate-display-name-with-given-name-and-surname-in-azure-b2c-built-in

    If you leave a request in feedback.azure, the engineering team will also be able to reply to you directly and if you share the details I can add those to the internal request as well. https://feedback.azure.com/

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Mohamed 0 Reputation points
    2023-12-07T03:30:23.42+00:00

    Also having the same problem. Display name might be helpful in a certain applications, but is redundant when not needed and the "unknown" is quite annoying in the account UI page.

    0 comments No comments

  2. Georg Pavlovic 1 Reputation point
    2024-06-03T21:36:26.54+00:00

    Also having the same problem. If no display name has been provided, I think it would be safe to auto-populate it with the first name and surname instead of the "unknown".

    I have created a feature request as suggested by @Marilee Turscak-MSFT : https://feedback.azure.com/d365community/idea/aee7c739-f021-ef11-8ee8-6045bdbe00d6

    Please upvote the feature request if you also wish to have this feature.

    0 comments No comments