I have been calling the VSTS REST APIs successfully, then all of a sudden, everything starts breaking. Looking at the response, I am getting HTML instead of JSON. Taking a closer look at the HTML, I find the following text;
Microsoft Internet Explorer’s Enhanced Security Configuration is currently enabled on your environment. This enhanced level of security prevents our web integration experiences from displaying or performing correctly. To continue with your operation please disable this configuration or contact your administrator.
Ugh… did an update just break something? Did corporate just push some new policies? Did I misconfigure something?
On to my favorite search engine to try and figure out what happened. Found a ton of articles, but everything pointed a finger at IE configuration. Long story short, had nothing to do with IE.
Turns out that my PAT (Personal Access Token) expired.
When you call the REST API, if you don’t have a valid PAT, it attempts to open a login screen prompting you to enter your credentials. You can see this behavior is you open a browser and enter your URL.
Once I created a new PAT and updated my code, I was good to go.
So, if you are getting an IE Enhanced Security Error…. Before you panic, check to make sure that your PAT doesn’t have any copy paste errors and is still valid.
Hope this saves someone a little time.