I have quite a common CSOM provider hosted app. (On Premise, HighTrust) Inside this app I use the infamous

using (var clientContext=GetContext()) {


(I can provide more code if needed, but as this works in most browsers this should not be a code issue)

On the dev machine, everything works fine (any browser). At the customer, Chrome works and Firefox works. But the Internet Explorer (9 and 11) throw a 401 error:

System.Net.WebException: The remote server returned an error: (401) Unauthorized.\r\n at System.Net.HttpWebRequest.GetResponse() at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute() at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuildersb) at Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryImplementation(ClientRuntimeContext clientContext, Int32 retryCount, Int32 delay)

What could be the problem?

  • R u Creating the Context using Username and password or using SharePointContext and TokenHelper ..? – TARUN May 12 '17 at 12:48
  • Tokenhelper (SharePointContext.CreateAppOnlyClientContextForSPAppWeb) – Ole Albers May 12 '17 at 12:52
  • Allow the app to make app-only calls checked ? – TARUN May 12 '17 at 12:55

Allow the app to make app-only calls checked

Allow the App to make App-only calls

  • It is. Otherwise this would not work on chrome or firefox – Ole Albers May 12 '17 at 12:55
  • Make sure that lowercase Guid string like this.. make sure no Capital letter in the IssuerID <add key="IssuerId" value="983802ac-c7a9-4b50-8100-2c6e2773b9cf" /> – TARUN May 12 '17 at 13:09
  • Try to create the Certificate again test it – TARUN May 12 '17 at 13:11
  • issuerID is already lowercase – Ole Albers May 12 '17 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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