Issue: If a user was imported via AD but shows up with the wrong username on the O365 side (ending in .onmicrosoft.com)
Resolution:
- Go to Active Directory Users and Computers
- Go to View and select Advanced Features
- Go to properties of user account
- Go to Attribute Editor
- Edit Proxy Address to: SMTP:user@domain.com
- Open PowerShell as Admin
- Connect to the online service with the following commands: (If needed Install-Module MSOnline)
- $msolcred = get-credential
- Connect-MsolService -Credential $MSolCred
(Note: Enter your Office 365 credentials when prompted)
- Enter the command to update the user name:
- Set-MsolUserPrincipalName -UserPrincipalName user@company.onmicrosoft.com -NewUserPrincipalName user@domain.com
Changes should take effect within a few moments and set this user as the default username.
Need Help Now?
Messing with Azure AD Sync can lead to account lockouts and identity ‘mismatches’ for your entire team. Let our Microsoft Cloud experts handle your sync issues and clean up your environment.
Proudly based in Colorado – serving businesses across all 50 states via secure remote support.

