How do I resolve Sync issue between Azure Active Directory and Exchange Online?

Matthew Beaso 10 Reputation points
2024-02-09T23:40:16.91+00:00

Hi all,

I have a few users on our O365 exchange, whose primary email address have somehow picked up the suffix "@companydomain.onmicrosoft.com" .

When I tried changing the primary email back to "@companydomain.com" I encounter the following error:
User's image

I have so far done the following:

  1. Checked with our on-premise AD to confirm correct user email was typed in.
  2. Re-run Azure AD Connect to refresh domain schema (successful without any errors)

Appreciate your help in resolving this issue.

Thanks.

Matt.

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,171 questions
Microsoft Security Microsoft Entra Microsoft Entra ID
{count} vote

1 answer

Sort by: Most helpful
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2024-02-10T15:09:16.5933333+00:00

    You cannot make changes against objects synchronized from AD, so the above is the expected behavior. That said, there is a workaround that might work in your scenario, if all you need to change is to update the primary SMTP address. Try the following:

    Set-Mailbox ******@domain.com -WindowsEmailAddress ******@domain.com
    

    This cmdlet should work even for synced users and will overwrite the current Primary SMTP value (while preserving the old value as additional alias, so there is no concern of potential email loss). However, this is not an officially supported method and any changes you make can be eventually overridden by AAD Connect/sync, so also make sure the on-premises value is updated.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.