Monday, May 26, 2014

Error: Resolved : Connect-SPOService : For security reasons DTD is prohibited in this XML document.

Today, I could not connect to my tenant admin with PowerShell. When I execute PS command:
Connect-SPOService -Url https://O365SPSite-admin.sharepoint.com

 I was getting the following error:
Connect-SPOService : For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.
At line:1 char:1
+ Connect-SPOService -Url https://O365SPSite-admin.sharepoint.com

I checked that a latest version of the "SharePoint Online Management Shell" was installed on my local machine. But error was still occurring.

Later, I noticed problem reoccurs only from my home(Virgin Media) network and not when I connect through Azure Virtual machine. 
I also found connection to SharePoint online uses  Microsoft.SharePoint.Client.SharePointOnlineCredentials class. Checking this API I noticed culprit is my local Broadband provider "Advanced Search Service". which was intercepting my request. 
I have to google to stop my ISP to intercept this:: http://www.virginmedia.com/myvirginmedia/advancederror/ 

Opting out from this ISP Search service sorted the problem and finally managed to connect to SP Online service using Global Admin account.