Office365: UPN domain update in a hybrid environment

DirSync fails with error “UserPrincipalName is not valid”

In a hybrid Exchange Office 365 environment we found that sometimes dirsync is unable to syncronize UPN domain changes made on premise to office 365.
When this happens you can follow the instructions below to change the UPN in Office 365 manually.

Example: User1 has his UPN changed from user1@company1.com to user1@company2.com. @company.onmicrosoft.com is the internal Office365 domain.

Solution 1
• Change the UPN on-premise to user1@company2.com
• Open a powershell session to Office365
• Type Set-MsolUserPrincipalName -UserPrincipalName user01@company1.com -NewUserPrincipalName user01@company2.com <ENTER>

If this results in an error like: Unable to update this object in Windows Azure Active Directory, because the attribute [FederatedUser.UserPrincipalName], is not valid”, then try Solution 2.

Solution 2
• Change the UPN on-premise to user1@company2.com
• Open a powershell session to Office365
• Type Set-MsolUserPrincipalName -UserPrincipalName user01@company1.com -NewUserPrincipalName user01@company.onmicrosoft.com <ENTER>
• Type Set-MsolUserPrincipalName -UserPrincipalName user01@company.onmicrosoft.com -NewUserPrincipalName user01@company2.com <ENTER>

Laatste nieuws

Ontwerp nieuwe locatie DTX

DTX gaat verhuizen echter niet voordat onze nieuwe locatie helemaal is aangepast naar onze wensen.

Lees meer

DTX wij maken communicatie kinderlijk eenvoudig.

© 1999 - 2017 DTX B.V.  •  Disclaimer