SharePoint Online: How to Change the User’s Display Name?

Requirement: Change the user display name in SharePoint Online using PowerShell.

How to Change the Display Name of the User in SharePoint Online?

When working with SharePoint Online, there may be instances where you need to update a user’s display name. Perhaps you have an employee whose last name has changed, and you need to change their name in the system. In this blog post, we will show you how to update the display name of a user in SharePoint Online.

If your Office 365 tenant is configured to sync user accounts from On-Premises Active Directory, then change the user name there first! Then it will be propagated to Office 365 and then SharePoint Online. In case you have two-way sync enabled or managing user accounts from the Office 365 portal, do the following to change the user display name:

  1. Login to Microsoft Admin Center at: https://admin.microsoft.com.
  2. Expand Users >> Active Users >> Search and Select the User.
  3. In the user properties panel, click on the “Manage Contact Information” link and then update the user’s display name and click on “Save Changes”.sharepoint online change user display name

This changes the user name in Office 365, and the SharePoint user profile sync timer job eventually reflects this change once it’s executed.

Update User Display Name in Azure AD using PowerShell

The above steps can be scripted with PowerShell. Make sure you have the Azure AD PowerShell module installed (If not, install it with Install-Module -Name AzureAD)

Import-Module AzureAD -DisableNameChecking

#Parameter - Login ID of the User
$UPN = "Steve@crescentintranet.onmicrosoft.com"
$Displayname = "Steve Johnson"

#Connect to Azure AD
Connect-AzureAD -Credential (Get-Credential)

#Change Display Name of the User
Set-AzureADUser -ObjectId $UPN -Displayname $Displayname

Change user display name in SharePoint Online using PowerShell

Here is the PowerShell to update the display name manually:

Please note, the above PowerShell script updates the user display name only for the given site. You may have to loop through each site in the tenant and change the display name of the user, as the user details are stored in the UIL of each site collection.

#Parameters
$SiteURL = "https://crescent.sharepoint.com/sites/Projects"
$UserID = "i:0#.f|membership|Steve@crescent.com"
$NewDisplayName = "Steve Johnson"

#Connect to the site
Connect-PnPOnline -Url $SiteURL -Interactive

#Get the user
$User = Get-PnPUser -Identity $UserID

#Update the display name
$User.Title = $NewDisplayName
$User.Update()
Invoke-PnPQuery

If you want to update the display name in SharePoint on-premises, please see this article: How to Update SharePoint User’s Display Name using PowerShell?

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

One thought on “SharePoint Online: How to Change the User’s Display Name?

  • You’ve always been doing a very excellent job! Thanks immensely for your help! Truly appreciate your kindness.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *