change the User ID that is being used to login to Office 365

I need to change the User ID that is being used to login to Office 365.  We have an on site Exchange 2010 server and have migrated to Office 365.  Our current domain and email address is user@abc.com and Microsoft created us a domain called 123.com.  My users really have two email addresses, user@abc.com and user@123.com.  This is fine and we are using AD synchronization which is working fine.  

However, it makes my users log into their accounts with the user@123.com account when accessing email or 365 in the cloud.  But at work in our domain, they are accustomed to using user@abc.com.  Is their a way I can make it allow them to login with the other account id instead of the one Microsoft created?

Thanks
Lanee
Lanee KirbyAsked:
Who is Participating?
 
Vasil Michev (MVP)Connect With a Mentor Commented:
Do you "own" the abc.com domain and have you verified it in O365? If you need help with the process, read here: https://support.office.com/en-us/article/add-a-domain-to-office-365-6383f56d-3d09-4dcb-9b41-b5f5a5efd611

Once that is done, you can use the abc.com domain to assign UPNs/EmailAddresses to the users, so they can match across on-premises and O365. To change the UPN, you can use the Set-MsolUserPrincipalName cmdlet: https://docs.microsoft.com/en-us/powershell/module/msonline/set-msoluserprincipalname?view=azureadps-1.0
0
 
Todd NelsonSystems EngineerCommented:
Do you have the abc.com domain added to O365, and if not, can you add it?
0
 
Lanee KirbyAuthor Commented:
We do own the ABC.com domain and I have added it O365 and it is listed as the (default) domain.  However, we have always (about a year now) had to login to O365 with our 123.com login account name.  I read articles about what your suggestion is supposed to do.  Help me understand please.  In my User profile account in AD on site, their User profile name is User @ Local.ABC.com. (long, long ago, when my domain was created, the person put the name local in it).  In their AD profile it lists their email address as User@ABC.com.

In O365, it lists both addresses, User@ABC.com and User@123.com.  It lists User@ABC.com as the primary but it lists the User profile as User @ 123.com.

Question is The powershell command is supposed to change the User ID in O365, not locally in my AD, since it is already correct?  I cannot manually change it in O365 even though their is a drop down box.

Thanks for any clarification.

Lanee
0
 
Vasil Michev (MVP)Commented:
Email addresses dont matter here, only the UserPrincipalName. You can change it in O365 directly, via the PowerShell cmdlet I linked above.

The on-premises and O365 UPNs dont need to match, although it's a good practice to keep them in sync.
0
 
Lanee KirbyAuthor Commented:
Thank you for your assistance.  The command Set-MsolUserPrincipalName did not make the necessary changes that I needed.  It actually failed saying it did not know what that parameter meant.  
However, upon searching some more, I found this command that did exactly what I needed.
Set-Mailbox "xxxxxxx@123.com" -MicrosoftOnlineServicesID "xxxxxxx@abd.com"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.