Changing username in Office 365 that is directory synchronised
When using Azure AD Connect, the userPrincipalName attribute in Active Directory is used to set the user name in Office 365. This username is used for all Office 365 services such as Outlook Web Access, ActiveSync, SharePoint, etc.
It’s not possible to change the username in Office 365 admin console and you will receive a message, “This user is synchronized with your local Active Directory. Some details can be edited only through your local Active Directory.”
When changing the userPrincipalName attribute in Active Directory it still won’t synchronise the change to Office 365, even when using the
-PolicyType Initial flag. The only way to update the username / User Principal Name in Office 365 is to use the Microsoft Azure Active Directory Module for Windows PowerShell with the the following command: