I am using PowerShell script listed here: http://www.sharepointdiary.com/2016/11/sharepoint-online-import-terms-to-termset-using-powershell.html to update managed metadata terms but for some reason its throwing an error. It was working fine when I tested on my test tenant but in production (end client, different tenant), Its not working. Below is the error message:

"Error Importing Term Store Data! Exception calling ExecuteQuery with 0 arguement(s): 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."

Can someone please help me why I am seeing this error and what is the solution, thanks in advance. P.S: I am using the exact same Powershell script that is in the article link I mentioned above, with the changes being, tenant url, CSvheader etc.

enter image description here enter image description here

2 Answers 2


It's some sort of problem with your dns server. Try switching your dns to use googe's dns service:

Other posts suggest trying to disable IPv6 if the above doesn't work at first.

  • Mike, thanks for the feedback. I am little confused regarding DNS change, I mean the end client is using SharePoint online. How do I make changes in such case?
    – mdevm
    Commented Jan 16, 2019 at 0:57
  • What's worked for me is changing the DNS on the machine you're running the powershell scripts on. As in control panel --> network and sharing --> change adapter settings --> r-click on network --> properties --> tcp/ip v4
    – Mike2500
    Commented Jan 16, 2019 at 1:29
  • Mike, thanks. I have added screenshots of my adapter settings in question description. Currently ipv4 and ipv6 both are checked. What should I do, please suggest.
    – mdevm
    Commented Jan 16, 2019 at 1:40
  • go to the properties of ipv4 and change the dns to Of course, this will impact using normal network resources, so you'll need to change it back to whatever it was set to, most likely dynamic, once you're done with powershell
    – Mike2500
    Commented Jan 16, 2019 at 2:03

Try to do as follows.

1.Check the DNS for the following record:


Alias: MSOID

Target: clientconfig.microsoftonline-p.net

Info: Used by Office 365 to direct authentication to the correct identity platform More Information.

2.To provide an entry in your hosts file(C:\Windows\System32\drivers\etc) which ensure that the msoid URL will be invalid. Refer to here.

3.If you use a 2nd router as a WiFi extender, stopped using it and used the main router/wifi box.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.