Hi,
The issue would occur while the DNS records for Autodiscover are pointed to the on-premise SFB Server.
To resolve this issue, run the cmdlet again, but instead specify the OverrideAdminDomain property. The PowerShell cmdlet should resemble the following:
$cssession = New-CsOnlineSession –Credential $cred –OverrideAdminDomain "domainname.onmicrosoft.com"
As for the OverrideAdminDomain, please Use the default domain that was included with your Office 365 subscription. Please try to run the -OverrideAdminDomain parameter to test again.
Here are some reference:
https://support.microsoft.com/en-us/help/2909536/lync-administrators-can-t-connect-to-skype-for-business-online-remote
http://blog.chrislehr.com/2014/12/lync-online-powershell-issues-and.html
https://office365itpros.com/2018/08/28/unable-to-discover-powershell-endpoint-uri-when-using-mfa-with-skype-online/
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found
there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
Kind regards,
Calvin Liu
Please remember to
mark the reply as an answer if you find it is helpful. It will assist others who has similar issue. If you have feedback for TechNet Subscriber Support, contact
tnsf@microsoft.com.
Click
here to learn more. Visit the dedicated
forum to share, explore and
talk to experts about Microsoft Teams.