Accessing SharePoint Data using Postman (SharePoint REST API)

SharePoint App Registration

https://yourtenantname.sharepoint.com/_layouts/15/appregnew.aspx
AppRegNew.aspx
https://yourtenantname.sharepoint.com/_layouts/15/appinv.aspx
AppInv.aspx with app details
Trust the SharePoint App

Postman

Postman variables for SharePoint App

Access Token Request

https://accounts.accesscontrol.windows.net/{{realm}}/tokens/OAuth/2
Body for getting access token
var json = JSON.parse(responseBody);
postman.setEnvironmentVariable("appReg_bearerToken", json.access_token);
Storing the access token in the environment
Sending the request

Getting List Items

https://yourtenantname.sharepoint.com/_api/web/lists/getbytitle('ListTitle')/items?$select=Title
Headers for Get Items request

--

--

Microsoft MVP. M365 Developer Architect at Content+Cloud.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store