Sync issue between Azure Active Directory and Exchange Online

Dmitrii Ruzhanskii 20 Reputation points
2023-10-26T14:58:56.3266667+00:00

Greetings, colleagues!

I hope everyone is enjoying your time and I appreciate your time and attention.

In our company, we had a disabled account for a user and 2 days ago I activated it using AD users and computers.

It synced with the cloud and user can log in using their new email and password.

Today they contacted me with the request that colleagues cannot find the email from the list, because the recommended email contains "@onmicrosoft.com" instead of @companyname.com

Steps I have taken to solve it:

  1. Checked AD users and computers, and specified these fields manually:

proxyAddress - SMTP:******@companyname.com

mail - ******@companyname.com

It didn't help

  1. I opened Exchange and for the user I can see "Primary email" is ******@onmicrosoft.com, SMTP: ******@companyname.com

2.1. I try to change the primary email but I gtt the following error:

Error:

Error executing request. An Azure Active Directory call was made to keep object in sync between Azure Active Directory and Exchange Online. However, it failed. Detailed error message: Unable to update the specified properties for on-premises mastered Directory Sync objects or objects currently undergoing migration. DualWrite (Graph) RequestId: d5807dd2-e490-4f08-9e1a-b3c5ad239445 The issue may be transient and please retry a couple of minutes later. If issue persists, please see exception members for more information.

  1. I opened the Entra and there are correct fields for the user, like nickname.

At this moment I am stuck and cannot fix it.

I need your experience and advice, please, to solve it.

Microsoft Exchange Online
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,186 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yuki Sun-MSFT 41,216 Reputation points Microsoft Vendor
    2023-10-31T02:09:37.4+00:00

    Hi @Dmitrii Ruzhanskii ,

    We can close the ticket. I just created a new account with correct email...

    Okay, this might be the quickest way to solve it as troubleshooting is often more time consuming. Thanks for the update and sharing it so that others experiencing the same thing can reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your reply in case you'd like to "Accept" the answer : )


    [Sync issue between Azure Active Directory and Exchange Online]

    Issue Symptom:

    we had a disabled account for a user and 2 days ago I activated it using AD users and computers.It synced with the cloud and user can log in using their new email and password.

    Today they contacted me with the request that colleagues cannot find the email from the list, because the recommended email contains "@onmicrosoft.com" instead of @companyname.com

    Steps I have taken to solve it:

    1.Checked AD users and computers, and specified these fields manually:
    proxyAddress - SMTP:******@companyname.com
    mail - ******@companyname.com

    It didn't help

    2.I opened Exchange and for the user I can see "Primary email" is ******@onmicrosoft.com, SMTP: ******@companyname.com
    2.1. I try to change the primary email but I gtt the following error:

    Error:

    Error executing request. An Azure Active Directory call was made to keep object in sync between Azure Active Directory and Exchange Online. However, it failed. Detailed error message: Unable to update the specified properties for on-premises mastered Directory Sync objects or objects currently undergoing migration. DualWrite (Graph) RequestId: d5807dd2-e490-4f08-9e1a-b3c5ad239445 The issue may be transient and please retry a couple of minutes later. If issue persists, please see exception members for more information.

    3.I opened the Entra and there are correct fields for the user, like nickname. Didn't fix it.

    Current status:

    "I just created a new account with correct email..."

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Vasil Michev 113.4K Reputation points MVP
    2023-10-26T15:42:17.2733333+00:00

    You can try the below cmdlet to force a change of the PrimarySMTPaddress:

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

    This will set ******@domain.com as the new primary SMTP address, while preserving the old one as secondary. And it will work even for synced users.

    That's the only attribute you can update in such manner though, so if you have other mismatches between Azure AD and ExODS, best open a support case and ask the engineer to trigger a sync.

    1 person found this answer helpful.

  2. Yuki Sun-MSFT 41,216 Reputation points Microsoft Vendor
    2023-10-30T07:01:27.42+00:00

    Hi

    1. I opened Exchange and for the user I can see "Primary email" is ******@onmicrosoft.com, SMTP: ******@companyname.com 2.1. I try to change the primary email but I gtt the following error:

    Please try making the change from Exchange admin center on-premises and then force the sync with Azure AD connect.

    Here's a blog about the same error for reference: An Azure Active Directory call was made to keep object in sync.
    (Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.)


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in [our documentation] to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Dmitrii Ruzhanskii 20 Reputation points
    2023-10-30T15:50:25.5+00:00

    We can close the ticket. I just created a new account with correct email...

    0 comments No comments

  4. Vicente 0 Reputation points
    2024-07-17T08:47:13.9566667+00:00

    I struggled with this issue, trying to make the default email as @mydomain.com instead of @mydomain.onmicrosoft.com.

    Checked the proxyAddress on 365 and on-premise, I could see @mydomain.com on both of them. When trying to make @mydomain.com as default, still got the same error.

    Today while checking the user on Entra admin center, on Contact Information properties of the user, I saw the field "Other emails" and added @mydomain.com. After that I tried to make @mydomain.com default on Exchange admin center and it worked.

    0 comments No comments

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.