Workaround on Connect-SPOService : For security reasons DTD is prohibited in this XML document.
October 26, 2020When trying to "Connect-SPOService" with SharePoint Online, you might encounter 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.
Somehow, it could be triggered by many possible reasons.
Solution:
Modify your local HOSTS file located under C:\Windows\System32\drivers\etc and add the following below entries:
1. 127.0.0.1 msoid.(domain).onmicrosoft.com
2. 127.0.0.1 msoid.onmicrosoft.com
3. 127.0.0.1 msoid.(domain).com*
Open the HOSTS file with Notepad++ or Notepad and Run As Admin then add above entries, (domain) is your domain name in Microsoft 365.
*Following point number 3, if you don't register a new domain, you don't have to add it.
0 comments