How to Fix Microsoft 365 Showing an onmicrosoft.com Address as Primary
Question details
Users need to correct the primary email address in Microsoft 365 that incorrectly defaults to the onmicrosoft.com domain after an Active Directory synchronization.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Synchronizing local Active Directory with Microsoft 365 accounts.
- Observed behavior
- The primary email address for users in Microsoft 365 displays an onmicrosoft.com domain instead of the assigned custom domain.
Ensure that your custom domain is fully added and verified in the Microsoft 365 admin center, and verify that the domain is not already assigned as the primary address for another user or object.
Modify Active Directory Attributes and Force Sync
Update the proxyAddresses and mail attributes in your local Active Directory to correctly define the primary email address, then force a synchronization.
Microsoft 365 relies on the local Active Directory attributes during synchronization. The proxyAddresses attribute uses specific capitalization to determine which email address acts as the primary address versus a secondary alias.
Launch Active Directory Users and Computers (ADUC) on your server. Click on the 'View' menu and ensure 'Advanced Features' is checked.
Locate and right-click the affected user account, select 'Properties', and navigate to the 'Attribute Editor' tab.
Scroll down to find 'proxyAddresses', click 'Edit', and ensure the primary email address has an uppercase prefix (e.g., 'SMTP:user@customdomain.com'). Any aliases should use a lowercase prefix (e.g., 'smtp:alias@customdomain.com').
In the same Attribute Editor list, find the 'mail' attribute. Edit it to exactly match your desired primary email address (e.g., 'user@customdomain.com'). Click 'OK' to save.
Open PowerShell on your Azure AD Connect server as an administrator and run the command 'Start-ADSyncSyncCycle -PolicyType Delta' to push the changes to Microsoft 365.

Looking for a Lightweight Office Suite Alternative?
While resolving Microsoft 365 backend sync errors can be complex and time-consuming, your everyday productivity software doesn't have to be. WPS Office is a highly compatible, easy-to-use alternative to Microsoft Office that helps you work smarter without the heavy administrative overhead.
- 1. Download WPS Office: Visit the official WPS Office website to download the free installation package.
- 2. Install the Suite: Run the lightweight installer and follow the simple on-screen instructions to complete the setup.
- 3. Open Your Files: Launch WPS Office and instantly open your existing Microsoft Office documents without worrying about formatting loss.

Frequently Asked Questions
Why does Microsoft 365 default to the onmicrosoft.com domain?
This usually happens if the intended custom domain is not fully verified in your Microsoft 365 admin center, or if the local Active Directory attributes for the user were not correctly formatted before the synchronization occurred.
What is the difference between uppercase SMTP and lowercase smtp in Active Directory?
Within the proxyAddresses attribute, an uppercase 'SMTP:' prefix designates the primary email address that will be used for sending and receiving. A lowercase 'smtp:' prefix is used for secondary email aliases.
How long does AD sync take after running the delta sync command?
A delta sync typically completes within a few minutes. However, it can take up to 30 minutes for changes to fully propagate from Azure AD to the Microsoft 365 admin center depending on your directory size and server load.




