Home:ALL Converter>How to authenticate SharePoint Rest API calls from c# back end? (Read details)

How to authenticate SharePoint Rest API calls from c# back end? (Read details)

Ask Time:2016-12-02T19:19:31         Author:Aadesh Magare

Json Formatter

I am trying simple application which listens for http requests and makes rest api calls to Sharepoint 2013.

Scenario:


A user makes a get request from the browser to the back-end (which is in c#). The sharepoint api is called from back-end. Now it should use the logged in users credentials for this request but I get unauthorized error.

Calling rest api directly from browser works.

Note : Users are authenticated with AD so I don't want to request credentials again in my app. Most solutions that I find assume that user is logged in on the machine making rest calls (back-end) but its different scenario.

Author:Aadesh Magare,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/40931016/how-to-authenticate-sharepoint-rest-api-calls-from-c-sharp-back-end-read-detai
yy