HCW fails with HCW8001 – Unable to determine the tenant routing domain after Set-MsolDirSyncEnabled -EnableDirsync $true

Luděk Hejrovsky 0 Reputation points
2023-12-02T20:13:04.8533333+00:00

I am migrating from Exchange 2013 to MS Business Basic. It is small organzation running only single server Win2012R2 AD+Exchange combined and one other server Win2016.

I have added UPN identical with default email domain to the local AD before running HCW first time.

I am getting error HCW8001 even after I did Set-MsolDirSyncEnabled -EnableDirsync $true.

I've had run the HCW on Exchange server (that is Windows 2012R2) and get the above error in "configuring" phase and no AADSync was installed. I believe it is normally installed during HCW process or am I wrong?

I found articles describing simillar problem, talking about AADSync creating domain "mail.onmicrosoft.com", so I decided to install AADSync by hand. It could not be installed on Exchange Server, because Win 2012R2, not supported by current version AADSync. I installed AADSync on the other server in domain, Win2016. AADSync is working, but domain mail.onmicrosoft.com was not created in the E365 accepted domains.

My situation seems to be the simillar as in this article: https://jaapwesselius.com/2020/06/09/hcw8001-unable-to-determine-the-tenant-routing-domain/

Exchange | Hybrid management
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jarvis Sun-MSFT 10,231 Reputation points Microsoft External Staff
    2023-12-04T02:48:02.31+00:00

    Hi @Luděk Hejrovsky,

    Welcome to our Q&A forum!

    It seems that you are facing an error with the Hybrid Configuration Wizard (HCW) while migrating from Exchange 2013 to MS Business Basic.

    You mentioned that you have already run the command Set-MsolDirSyncEnabled -EnableDirsync $true but still face the same error. I suggest you check if the accepted domain is associated with your on-premises Exchange server and Office 365 tenant. You can also refer to the prerequisites for deploying hybrid.

    It is worth noting that the domain “mail.onmicrosoft.com” is created by default when you set up directory synchronization using Azure AD Connect. It is used as a unique identifier for each user in Office 365.

    Besides, you can also try to use the following cmdlet to manually add the routing address for some user and then re-run the HCW to see if it can help:

    Set-AdUser username -Add @{ProxyAddresses=('smtp:******@contoso.mail.onmicrosoft.com')}

    If you have any further questions, please let me know.


    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.


  2. Luděk Hejrovsky 0 Reputation points
    2023-12-07T20:01:56.7466667+00:00

    I have opened MS Support case. The support engineer basicaly did the same procedure as me, many times before (download and run HCW) and this time it went through without error. He has run no script nor did any changes in the on-prem environment. Meaning, he has made some changes in the Tenant before calling me, but I don't know what it had been.

    I don't think it could be done by simple tenant's global admin anyway.

    After session, the .mail.onmicrosoft.com domain was present in the Exchange, I can't say if it had been there nefore HCW run or not.


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.