I recently was running through an Office 365 Migration (Staged) where I was trying to create the Migration Endpoint. As I was going through the configuration I was getting the following error message:
After manually typing in the details, I got the following message:
This one was a tricky one as I was running the test through the 'Test Exchange Connectivity' website, and it was all passing without issues. So it wasn't an autodiscover issue from what I could see.
After looking into this one for a few hours and not being able to find what the issue could be, I came across an issue with the Autodiscover and IPv6. When I was on the on-prem exchange server and I tried to ping the FQDN, it resolved an IPv6 address, even though this was disabled on the NIC.
To get around this, I had to edit the Hosts file on the server itself to resolve the IPv4 address when I pinged the server name, and hte FQDN. After doing this, when I went through the process to create the new migration point, I was able to get past this point and it discovered the server details automatically.