Events
Microsoft 365 Community Conference
May 6, 2 PM - May 9, 12 AM
Skill up for the era of AI at the ultimate community-led Microsoft 365 event, May 6-8 in Las Vegas.
Learn moreThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
A User Principal Name (UPN) is made up of two parts, the prefix (user account name) and the suffix (DNS domain name). For example:
user1@contoso.com
In this case, the prefix is "user1" and the suffix is "contoso.com."
You can change a user's UPN in the Microsoft 365 admin center by changing the user's username or by setting a different email alias as primary. You can also change a user's UPN in the Microsoft Entra admin center by changing their username. And you can change a UPN by using Microsoft PowerShell.
Note
A user's UPN (used for signing in) and email address can be different. If you just need to add a new email address for a user, you can add an alias without changing the UPN.
You can change a UPN by changing the prefix, suffix, or both:
Changing the prefix. For example, if a person's name changed, you might change their account name:
user1@contoso.com to user2@contoso.com
Changing the suffix. For example, If a person changed divisions, you might change their domain:
user1@contoso.com to user1@contososuites.com
Important
UPN changes can take several hours to propagate through your environment.
A user's OneDrive URL is based on their UPN:
https://contoso-my.sharepoint.com/personal/user1_contoso_com
(where user1_contoso_com corresponds with user1@contoso.com)
Note
If the user's UPN contains an underscore, it will be present in the resultant OneDrive URL.
In this case, if you changed the prefix to user2 and the suffix to contososuites.com, the user's OneDrive URL would change to:
https://contoso-my.sharepoint.com/personal/user2_contososuites_com
After you change a UPN, any saved links to the user's OneDrive (such as desktop shortcuts or browser favorites) will no longer work and will need to be updated.
The sync app (on both Windows and Mac) will automatically switch to sync with the new OneDrive location after a UPN change. While the UPN change is propagating through your environment, users may see an error in the OneDrive sync app that "One or more libraries couldn't be synced." If they select for more information, they'll see "You don't have permission to sync this library." Users who see this error should restart the sync app. The error goes away when the UPN change has been fully propagated and the sync app is updated to use the user's new OneDrive URL.
Note
Synced team sites are not impacted by the OneDrive URL change.
After a UPN change, users will need to close and reopen their OneNote notebooks stored in OneDrive.
Close a notebook in OneNote for Windows
Open a notebook in OneNote for Windows
After a UPN change, accessing the OneDrive app in Microsoft Teams can result in an error: 404 File not found.
Until a fix is released, to resolve the error:
Create a 1:1 chat with another user.
In the message box, select Actions and apps > Attach file > Upload from this device.
Select a file you will send to the other user, then select Open.
Press Enter to send the file or select Send.
After you’ve sent the file, navigate to the OneDrive app in Teams.
After a UPN change, users will need to browse to reopen active OneDrive files in their new location. Any links to the files (including browser favorites, desktop shortcuts, and "Recent" lists in Office apps and Windows) will no longer work.
If a user shared OneDrive files with others, the links will no longer work after a UPN change. The user needs to reshare the files.
After a UPN change, although Office will continue to work as expected, the user's original UPN will continue to be displayed in the Office Backstage View. To update the Office Backstage View to display the changed UPN, the user needs to sign out and then sign in using the Office client.
After a UPN change, it might take a while for files at the new OneDrive URL to be indexed. During this time, search results in OneDrive and SharePoint will use the old URL. Users can copy the URL, paste it in the address bar, and then update the portion for the new UPN.
Delve will also link to old OneDrive URLs for a period of time after a UPN change. As activity occurs in the new location, the new links will start appearing.
Any automated workflows that were created with Power Automate or SharePoint 2013 workflows and refer to a OneDrive URL won't work after a UPN change. Similarly, any SharePoint apps (including Power Apps) that reference a OneDrive URL will need to be updated after a UPN change.
If you're changing many UPNs within your organization, make the UPN changes in batches to manage the load on the system.
If possible, apply changes before a weekend or during non-peak hours to allow time for the change to propagate and not interfere with your users' work.
Info about UserPrincipalName attribute population in hybrid identity
Events
Microsoft 365 Community Conference
May 6, 2 PM - May 9, 12 AM
Skill up for the era of AI at the ultimate community-led Microsoft 365 event, May 6-8 in Las Vegas.
Learn moreTraining
Learning path
MS-102 Implement identity synchronization - Training
This learning path examines how organizations should plan for and implement identity synchronization in a hybrid Microsoft 365 deployment. You learn how to implement Microsoft Entra Connect Sync and Microsoft Entra Cloud Sync, and how to manage synchronized identities.
Certification
Microsoft Certified: Identity and Access Administrator Associate - Certifications
Demonstrate the features of Microsoft Entra ID to modernize identity solutions, implement hybrid solutions, and implement identity governance.