Changing a login name in Office 365 when using On-Premises Active Directory
Posted on 21 November 2016 by Beaming SupportYou may notice that when you try changing a login name in Office 365 within Active Directory it won’t sync across to Azure Active Directory without a bit of PS script.
Here are our instructions for changing a login name in Office 365 within Active Directory, using some PS Script.
This will need to be run from the AAD Sync Server using the ‘Windows Azure Active Directory Module for Windows PowerShell’
You’ll need to use the below PS script to log into the admin account of Office 365 using this first:
Connect-MsolService
Login using the primary administrator account.
Then use the below to change login name:
Set-MsolUserPrincipalName -NewUserPrincipalName user@domain.com -UserPrincipalName user@domain.com