Getting OAuth (client_credentials for M2M flow) to make HTTP request to SharePoint REST API

Copper Contributor

Hi all,


I'm working on an integration that will be making CRUD HTTP requests to a SharePoint online instance (I have a Microsoft 365 developer subscription). Before developing the integration I'm testing with Postman on how to get the OAuth token and making a trial request to be sure that authorization is working.

To get the OAuth token I've followed the instructions (are there any Microsoft 'official' guidelines on how to do this?) from and I manage to get an OAuth token.

When I try to use the token I got in Postman to make a simple test HTTP request ($select=Title) I get a 401 error with the following message {"error":"invalid_request","error_description":"Token type is not allowed."}

Can someone provide some guidance on how to get 'the right' token to interact with SharePoint REST API?


Thanks in advance


0 Replies