Recently I had to make a change in the Skype for Business Online environment of a customer. When I was trying to connect with Remote PowerShell I got an error message saying that it was “Unable to query AutoDiscover URL”.
It turned out that this customer was once using BPOS, and the domain used at that time was tenant.emea.microsoftonline.com. This domain is not supported to use with Skype for Business, since important DNS records are missing.
Luckily there are two solutions for this problem:
Connect using the -OverrideAdminDomain option, as described in KB2909536.
$cssession = New-CsOnlineSession ` –Credentials $cred ` –OverrideAdminDomain 'tenant.onmicrosoft.com'
This will force the cmdlet to look for DNS records at the tenant.onmicrosoft.com domain
This solution requires you to change the user name of the admin account to a supported domain (or create a new account). Renaming accounts can be tricky, but it is worth the job, since the emea.microsoftonline.com domain support is deprecated.
By using a new admin account I was able to connect.