Thursday, May 16, 2013

Visual Studio LightSwitch and Office 365 Unauthorized 401.0

I spent some time setting up Visual Studio LightSwitch 2012 with an Office 365 SharePoint development instance yesterday. It was incredibly frustrating that whenever I tried to do an F5 to debug an app that was associated with the Office 365 SharePoint instance, I would get a 401.0 unauthorized error. I trawled the web trying to find the answer without success.

I tried it at home instead of the office and it worked fine.

This led me to realise that it is probably an issue with the proxy server. Sure enough, when we looked at the proxy, it was failing when trying to hit these URLs

  • accounts.accesscontrol.windows.net
  • cdn.sharepointonline.com
  • *.sharepoint.com

Once we setup a proxy rule to allow these URLs through, it started working.