I have been struggling for quite some time to migrate our on-premise Exchange 2013 mailboxes to Exchange Online. I have not seen any resolution to this problem after extensive searching on the web, so I'm posting here hoping to get some new input.
The domain has a fully functioning sync from on-premise AD to Azure AD. The hybrid configuration wizard runs OK, configuring a hybrid setup. When trying to migrate a mailbox, however, i get an error saying "Connection to the server mail.mydomain.com could not be completed".
I have tried pretty much everything, including checking security permissions on the admin accounts, changing certificates from wildcard to FQDN (although only wildcards seem to address all the different services that is required). The only seemingly abnormal thing is that Test-MigrationServerAvailability from the on-premise Exchange-server fails with "AutoDiscover failed with a configuration error: The migration service failed to detect the migration endpoint using the Autodiscover service".
Testing the service from https://testexchangeconnectivity.com reports no errors, although it might not be completely clear to me what the correct test is supposed to be. The "mail.mydomain.com" address is resolvable and accessible on port 443.
Would appreciate any suggestions on where to look further to resolve this.