This week I had a very interesting Exchange Hybrid Wizard error present itself that I haven't seen before, or at least seen the root cause before. The purpose of this post is to actually have some data on it searchable on the internet so if you are facing this issue you know what to expect and do.
The error is: "An error occurred while attempting to provision Exchange to the Partner STS. Detailed Information "An error occurred accessing Windows Live. Detailed information: "Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'"
This error never presents itself in the HCW, infact once you have added your TXT records to your required domains, the HCW will just hang at 'adding Federated Domain...' and sit on this screen forever:
You'll wait and wait and wait, and nothing will ever happen. This is when you hopefully dig into the HCW log and get dig through it to find the cause. Now I have had this happen before, and we know we have to look to the HCW log to see what's going on. However the issue wasn't what I was expecting.
In my case the error was caused because the web service that allows the HCW to provision the domains onto the Microsoft Federation Gateway had failed, and was returning a 500 error. This is why the HCW log was complaining it was expecting an html xml response but instead was getting an html response with text.
So if you recieve this error what can you do to check that it's Microsoft's issue and not yours?
When working it will give you the following
In my instance, with the HCW stalled it was due to Microsoft actually having a service health issue.
It's good to point out that if you're getting other "An error occurred while attempting to provision Exchange to the Partner STS"
errors to still check the web service. You may find you have a proxy or firewall in the way causing issues between the HCW and the functioning web service. Compare https://domains.live.com/service/managedelegation2.asmx
from another network that you know won't have proxy or firewall issues or even check it on your phone via 4G.
On another note I have reached out to the Exchange Product Group as I think Office 365 Service Health should be reporting on STS services as they will have potential impacts with enabling Exchange Hybrid and federation capabilities.