Change Office 365 Synced Users UPN Name.
Every now and then we get a user request to have their Office 365 Signin name to be change. This is typically when someone gets married . So how do we change the Signin name.
We start with the Active Directory
- Rename the AD User (to match the new surname etc)
- Change the ProxyAddress
After changing the Active Directory details, we head over to AD Connect and force a delta sync.
1 |
Import-Module ADSync |
Then
1 |
Start-AdSyncSyncCycle -PolicyType Delta |
Once the sync has completed, you will notice that all the changes has applied. However the user SignIn name in Office 365 has not changed.
To change the SignIn name / UPN in Office 365 to match what is in Active Directory we need to start an MSOL PowerShell session.
Run the following:
1 |
Connect-MsolService |
Once a session has been established run the following:
This cmdlet will get the current UPN / SignIn name for the user Jessica.may@o365cloudlab.co.za
1 |
Get-MsolUser -UserPrincipalName Jessica.May@o365cloudlab.co.za |select DisplayName,SignInName,UserPrincipalName |
Now that we have noted the current Signin and UPN details of the users, we can go ahead and change it to match what is not in Active Directory.
To change the SignIn /UPN name run the following:
1 |
Set-msoluserprincipalname -newuserprincipalname Jessica.Jones@o365cloudlab.co.za -userprincipalname Jessica.May@o365cloudlab.co.za |
To change the SignIn details we need to provide the current UPN name which is:
Then we need to provide the new UPN which is:
Once this has been set, the user can now login to Office 365 using the new SignIn name.
Be First to Comment