Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SharePoint Online Powershell Connect-SPOService DTD Error

So you've been getting weird DTD Error messages when trying to connect to your Sharepoint Online tenant using Powershell? well me too! and some Fiddling gave me the solution.

if you get a message along these lines:
Connect-SPOService : For security reasons DTD is prohibited in this XML document

then you're receiving some weird html instead of an authentication token back from SharePoint online. The easiest way to drill into this is to load Fiddler2 and track the traffic when you run the connection. Ignore the 403 and 401 errors. they are simply part of the normal authentication handshake. The interesting one is actually not the error but a 200 I found at the bottom of the list. a 200 code normally means all is good. but looking at it more closely I noticed that it did not come from SharePoint online but instead from Bigpond!! what? yeah. my ISP could not find the authentication endpoint under
hmpf. msoid? That's new to me. Looks like earlier this year MS introduced another DNS configuration step required for powershell commands to function:

notice the msoid CNAME entry? that's what I was missing. So as a quick fix I pinged, recorded the IP address that gave me back and entered a manual record in my hosts file. And voila, the connection works again! :-) Obviously I'll be updating my public DNS to match that CName.  but for now the quick fix did the trick!

hope this solves it for you too!

This post first appeared on SharePoint Training, Alex Dean, please read the originial post: here

Share the post

SharePoint Online Powershell Connect-SPOService DTD Error


Subscribe to Sharepoint Training, Alex Dean

Get updates delivered right to your inbox!

Thank you for your subscription