SharePoint Online (O365) OAuth Authentication | Authorizing REST API calls against SharePoint Online Site | Get Access token from SharePoint Online | Set up OAuth for SharePoint Online Office 365
Here is my most awaited post on how to set up OAuth for SharePoint Online so that we can authorize REST API calls to the SharePoint site to retrieve data and manipulate the site data. The steps going to be easy and I will demonstrate along with screenshots and examples with the Google PostMan RESTClient . I have explained the steps below which follows the OAuth 2.0 protocol. All the steps are straight forward, but constructing the URLs are little tricky! Below are the detailed steps: 1. Register an app in SharePoint · Navigate to https://your_site_name.com/_layouts/15/appregnew.aspx · Click Generate for Client Id and Client Secret. · Give a name for the app, fill in the app domain (ex: www.google.com , www.salesforce.com ). Enter the Redirect URL, important here is when entering redirect url, it should be https and this is the url, to which the site redirects once you authorize your app and get auth.code (which will be explained late