"There is an error in XML document (5,2)" when you run the New-CsOnlineSession cmdlet to connect to Skype for Business Online

Symptoms
You try to connect to Skype for Business Online (formerly Lync Online) by using the following cmdlet in a remote Windows PowerShell session: 
$O365Session = New-CsOnlineSession -Credential $credential

However, the connection to Get-CsPowerShellEndpoint fails, and you receive the following error message: 
“There is an error in XML document (5,2)”

Resolution
This is a known issue in Skype for Business Online that Microsoft is working to resolve. To work around this issue, include the OverridePowerShellUri parameter, and specify the fully qualified domain name (FQDN) of the Skype for Business Administration center URL, as in the following example: 
$O365Session = New-CsOnlineSession -Credential $credential –OverridePowershellUri "https://admin1a.online.lync.com/OcsPowershellLiveid”
Note To determine the Skype for Business Administration center URL, see the "To determine the Hosted Migration Service URL for your Office 365 tenant" section of Manage users in a Skype for Business Server 2015 hybrid deployment.
Properties

Article ID: 3145838 - Last Review: 03/25/2016 20:05:00 - Revision: 2.0

Skype for Business Online

  • kbsurveynew o365 o365e o365a o365m o365022013 o365p KB3145838
Feedback