How UPN changes affect the OneDrive URL and OneDrive features

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 Azure AD 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.

Types of UPN changes

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.

OneDrive URL

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)

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.

Sync

If a user has sync client build 18.212.1021.0008 or later on either Windows or Mac (released to Production in November, 2018, the sync client 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 client that "One or more libraries could not be synced." If they click for more information, they will see "You don't have permission to sync this library." Users who see this error should restart the sync client. The error will go away when the UPN change has been fully propagated and the sync client is updated to use the user's new OneDrive URL.

Note

Synced team sites are not impacted by the OneDrive URL change.

OneNote

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

Recent files lists

After a UPN change, users will need to browse to re-open 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.

Shared OneDrive files

If a user shared OneDrive files with others, the links will no longer work after a UPN change. The user will need to re-share the files.

Office Backstage View

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 will need to sign out and then sign in using the Office client.

Search and Delve

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.

SharePoint automated workflows and customizations

Any automated workflows that were created with Microsoft Flow or SharePoint 2013 workflows and refer to a OneDrive URL will not work after a UPN change. Similarly, any SharePoint apps (including PowerApps) that reference a OneDrive URL will need to be updated after a UPN change.

Recommendations

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

See also

Info about UserPrincipalName attribute population in hybrid identity