Apr
17
2013

SharePoint Provider-Hosted App - 401 Unauthorized error on clientContext.ExecuteQuery()

So you are ready to develop a SharePoint app and have followed this MSDN article to get everything set up. F5 in visual studio, clicked Trust It to "Do you trust <name of your app>?" from SharePoint, and then you are getting 

The remote server returned an error: (401) Unauthorized

image

Chances are the IssuerId in provider-hosted application web.config is listed as a UPPER CASE Guid string. 

More...

James Tsai

Blog Disclaimer