Exchange Hybrid Configuration Wizard error - root element is missing when connecting to 365

Brass Contributor

Hi Exchange Brain trust, 


I have an Exchange 2016 environment where I recently joined a Exchange 2019 server to move everything and eventually decommission 2016 server. Everything is configured manually to match what we currently have in 2016 server - configuration wise, they both are identical now. We don't have any mailbox on-prem. Its just being used for administration and SMTP relay.


The question is, do we still have to run Hybrid Config Wizard ? The reason I'm asking is, I'm stuck on the following stage with an error I pulled my hair off for hours trying to figure the root cause. Connectivity is all working well.





Any idea would be really appreciated !


18 Replies

@Curious_Kevin16 I am actually having the same issue.  Even a similar situation but we have removed our Exchange 2016 environment and fully on 2019.  However in my case I am attempting to run through the wizard to update/check on a new certificate I just renewed.


EDIT: I can run the HCW on test exchange 2019 server we have.


Still troubleshooting on our end.



Same issue here ever since I moved over to Exchange 2019 CU14. I opened a ticket with Microsoft and they said it might be something to do with the .NET Framework.

This is what they told me, but it didn't help me.


To fix this issue, you can try the following steps:

  1. Make a backup copy of the machine.config file before making any changes to it.
  2. Open the machine.config file in a text editor, such as Notepad or Visual Studio Code.
  3. Check if the file contains any content. If it is empty, try restoring it from a backup or reinstalling the .NET Framework.
  4. If the file contains content, ensure that it begins with a root element, typically named <configuration> and ends with a closing </configuration> tag.
  5. If the root element is missing, add it at the beginning of the file, and ensure that all other elements are nested within it.
  6. Save the changes and restart the application or service that was using the machine.config file.
Thanks for the information. Machine.config is a OS level file ? where and which server this should be looked at?

I'm having same error here.

The hybrid configuration worked till recently, from about 2 weeks ago, user has reported that the mail from O365 accounts are not delivered.

Checking the undelivery report, it shows refused by the on-premise server.

Testing the outgoing connector from O365 to Org server does not go through.

We did renewed certificate recently. Is it the certificate broke the hybrid?

@Curious_Kevin16 Did you get this to work again? I have the same issue here.


Today it worked! Yesterday it opened the MFA window on my desktop instead of on the Exchange server and I couldn't see it because I was in remote desktop. Today the authentication request arrived on the server.

I authorized access on O365 with the app and everything was fine.


Was your issue resolved? I am exoeriencing teh same error on a new deployment.

Yes, the problem, for me, was the MFA that opened the request for the authenticator app on my desktop instead of on the server. Today the request arrived on server ad all worked well.


This is located:



Part of the .NET Framework


During the Office 365 Hybrid Cconfiguration setup, when you run into the "Root element is missing", hit the F12 key to bring up the diagnostic tools, and click on "Open Log File". You can see that it uses the .NET Framework assembly, and it thinks it's missing the root element. But upon checking the machine.config file on a notepad, I can see the opening and closing <configuration> tag, so that means the root element is present.


This issue really started happening when my Hybrid Configuration Wizard updated to the last version. I think it's a bug.

Thanks for posting the update. I checked our machine.config and everything looks good as well. I have two separate Exchange 2019 environments and M365 tenants, one for prod and one for test. I can run the wizard find on my test server, but my prod is having this issue.

Both have the same versions of .Net and machine.config files looks the same.

They are even both running the same version of the HCW. I will open a case on our end as well to see where I get.



I'm also experiencing the same issue on multiple Exchange 2019 servers.



Just looked up Microsoft Service Health:

The issue is on Microsoft's side.




Thanks for this. The issue isn't listed in our tenant although we are clearly affected. I submitted a ticket.
Great find! Thanks for posting this update. I don't see this issue in our tenant either. I will keep an eye out for it.

We had this issue for the last two days in one of our customers tenant. 365 service health have listed the advisory and it looks like a waiting game now. We had Microsoft support involved yesterday and spent a couple hours but they didn't pick this up. Thanks so much for initiating this thread.




@Manoj Karunarathne 

Just update for current status.

The Hybrid Configuration Wizard works now in my tenant.

It shows completed successfully.


But when click Office365 from Exchange admin center,  it shows 400 error.





Now working in my lab although had to remove and re-install HCW even if it was to the same version.
Exchange Server 2019 CU13
HCW 17.1.1730.0