Thursday, January 19, 2012

Change the UPN of a federated user after user has been synced to Office 365

Microsoft strongly recommends to make sure all UPN's needed in Office 365 to be set correctly before doing the initial DirSync.

However in some cases you may want to change the UPN after the initial DirSync anyway, for example:

  •  When you're companies history lacks correct user registration (names are not correct);

  •  When a user changes their lastname when he/she get's married and wants to use that name when logging in.


In this case it is possible to change the UPN of the user in the federated domain. However again this is not recommended. Here is how you do it.



  1. Login on the primary federation server;

  2. Open powershell;

  3. Import the MSonline powershell module "import-module msonline";

  4. Run the change UPN cmdlet "Set-MsolUserPrincipalName -UserPrincipalName [CurrentUPN] -NewUserPrincipalName [NewUPN]"


See also Microsoft Support article KB2523192 for more information on this subject.

No comments:

Post a Comment