Display Name for New Users in Office 365 Admin Center

Anonymous
2024-08-01T09:13:21+00:00

Hi all

When I set up a new user using office 365 admin center, it auto populates a display name for them. However this is Firstname Lastname and not Lastname, Firstname which is how we prefer it to be. I read somewhere that it could be done via power shell. Just wondered if anyone knew of any way this could be done. I've attached a snip of the screen for clarity.

Thanks

D

Microsoft 365 and Office | Subscription, account, billing | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-08-01T16:29:15+00:00

    Hello Daniel Collister**,**

    Good day! Thank you for reaching out to Microsoft community.

    Welcome to MS community, I am glad to assist you in this issue. Yes, you are right. In the Microsoft 365 admin center, when you create a new user, it will generate an auto Display name. By default, it will show the FirstName + Lastname.

    However, you can just click on the display name to change it as you see fit. On the other hand, if you face difficulties, you can follow the PowerShell commands below which I have tested now and works perfectly.

    As you can see, I have created a user where the Display name is "TEST" and the First name (Given Name) is "TEST A"

    Image

    Go to Windows PowerShell:

    Type the command:

    1. Set-ExecutionPolicy RemoteSigned
    2. Install-Module -Name AzureAD
    3. Connect-AzureAD [sign in with your Office 365 admin credentials]
    4. Get-AzureADUser [To see if it's connected & to get a list of all users]
    5. Image

    Copy the full single command and paste and run all together:

    $user = Get-AzureADUser -ObjectId test_a_@M365x27140211.onmicrosoft.com

    $newDisplayName = "$($user.GivenName)"

    Set-AzureADUser -ObjectId $user.ObjectId -DisplayName $newDisplayName

    Note: Change the green colored object-ID name to your own username that you want to change.

    Image

    Get-AzureADUser -ObjectId test_a_@M365x27140211.onmicrosoft.com | fl

    After running this command, when you go below, you will see that the Display name has been changed exactly the First name (Given name) as you wanted.

    Image

    If you go to the admin center, you will also see that the user display name has been changed.

    Image

    I hope this helps. Let me know if you have any further questions or concerns.

    And if the provided information is helpful and meets your requirement, you can also give Vote on that in order to make this thread a top content and help any other community users who might be facing a similar scenario to easily find this thread/post.

    At this point, I would like to thank you very much for your valuable time and kind cooperation.

    Have a great day ahead!

    Sincerely

    S M Nazmun Nur | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments