The user principal names (UPN) of users contain an Office 365 domain after synchronization

Article ID: 2523192 - View products that this article applies to.
Not sure what release of Office 365 you're using? Go to the following Microsoft website:
Am I using Office 365 after the service upgrade?
Expand all | Collapse all

PROBLEM

 When you run the Windows Azure Active Directory Sync Tool, the user principal names (UPN) of synced users contain the domain that's assigned to your company when you signed up for Office 365 instead of your company domain. For example, the UPN or email address of a user is as follows:
UserName@contoso.onmicrosoft.com

CAUSE

This behavior occurs if your company's domain isn't added to and verified in Office 365 before you start and enable Active Directory synchronization. If you start and enable directory synchronization before you add and verify your domain, user accounts synced. In this case, Office 365 assigns users a third-level Office 365 domain. For example, it assigns the following domain: 
contoso.onmicrosoft.com
And after the domain is verified, the UPN of the user is changed accordingly. To determine what the UPN is, on a domain controller or on a computer where the Windows Server Administration Toolkit is installed, follow these steps:
  1. Open Active Directory Users and Computers. To do this, click Start, click Run, type dsa.msc, and then click OK.

    Collapse this imageExpand this image
  2. Right-click the domain, and then click Find.

    Collapse this imageExpand this image
  3. In the Name box, type the user's display name, and then click Find Now.

    Collapse this imageExpand this image
  4. Double-click the user name in the search results, and then click the Account tab.
  5. Under User logon name, note the domain part of user logon name. This is known as the UPN suffix.

    Collapse this imageExpand this image

SOLUTION

We strongly recommended that you add and verify your domain in the Office 365 portal or by using the Windows Azure Active Directory Module for Windows PowerShell before you start and enable directory synchronization.

Make sure that users are synced from the on-premises environment to Office 365 by using the same UPNs and email addresses. All domains that are associated with users' UPN must be verified in your Office 365 subscription.

For example, if the on-premises UPN of a user is user@contoso.com, and the user's default email address is user@fabrikam.com, make sure that both the contoso.com domain and the fabrikam.com domain are verified.

Note the following scenarios:
  • If the user doesn't yet have a license, and the domain is verified, the UPN is changed accordingly.
  • If the user has a license, and the domain is verified, the following conditions occur:
    • The UPN doesn't change for non-federated users.
    • The UPN is changed for federated users.
    • The default email addresses are changed accordingly.
    • Alternative email addresses that use the verified domain are automatically added.
To update a non-federated user's UPN while they have a license, follow these steps:
  1. Start the Windows Azure Active Directory Module for Windows PowerShell, and then connect to Windows Azure Active Directory (Windows Azure AD). For more info about how to do this, go to the following Microsoft website:
    Connect to Windows Azure AD Using Windows PowerShell
  2. Run the following PowerShell cmdlet:

    Set-MsolUserPrincipalName -UserPrincipalName [CurrentUPN] -NewUserPrincipalName [NewUPN]

MORE INFORMATION

The Windows PowerShell commands in this article require the Windows Azure Active Directory Module for Windows PowerShell. For more information, go to the following Microsoft website: For more info about how to add and verify a domain in Office 365, go to the following Microsoft website:
Add and verify a domain name

For more info about updating other synced attributes, seethe Microsoft Knowledge Base article:
2643629 Individual Active Directory Domain Services objects don't sync to Windows Azure AD in Office 365

Video: Office 365: Users Appear with Office 365 Domain After Directory Synchronization

Collapse this imageExpand this image
uuid=ec7bbfeb-d07f-48c1-bb09-25be86aa4210 VideoUrl=http://aka.ms/jtufo4
Collapse this imageExpand this image

Still need help? Go to the Office 365 Community website.

Properties

Article ID: 2523192 - Last Review: May 31, 2013 - Revision: 37.0
Applies to
  • Microsoft Office 365 for enterprises (pre-upgrade)
  • Microsoft Office 365 for education  (pre-upgrade)
  • Windows Azure Active Directory
Keywords: 
o365 o365a o365e kbgraphxlink o365m o365022013 after upgrade o365062011 pre-upgrade KB2523192

Give Feedback