Issue: If a user was imported via AD but shows up with the wrong username on the O365 side (ending in .onmicrosoft.com)

Resolution:

  1. Go to Active Directory Users and Computers
  2. Go to View and select Advanced Features
  3. Go to properties of user account
  4. Go to Attribute Editor
  5. Edit Proxy Address to: SMTP:user@domain.com
  6. Open PowerShell as Admin
  7. Connect to the online service with the following commands:$msolcred = get-credentialconnect-msolservice -credential $msolcred
    (Note: Enter your Office 365 credentials when prompted)
  8. 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