Confirming API permissions and SharePoint endpoint URL for accessing SharePoint data through an API.

Copper Contributor

Hello All,


I have been working on a project that requires accessing SharePoint data using APIs.


I have referred to the official documentation provided by Microsoft, specifically the guide on "Complete basic operations using SharePoint REST endpoints" available at the following link:


According to the documentation, I have registered an application on the Azure portal. However, the guide does not mention which API permissions need to be added to the application in order to retrieve SharePoint data. Therefore, I have added the following API permissions (please note that I am not certain if these permissions are correct):



I use these API permissions to get OAuth token, and I can verify the inclusion of my API permissions within the response's scope.



However, I have encountered an issue when attempting to access the SharePoint endpoint using the obtained token. The error message I receive is as follows:



In addition, I also tried replacing the endpoint URL for SharePoint.

(The provided endpoint URLs for SharePoint in the following official documents are all different, which has caused me a lot of confusion about the exact SharePoint endpoint URL:

Microsoft Official Documentation

SharePoint Endpoint URL

http://<sitecollection>/<site>/_api/web/lists(listid)<site url>/web/lists(guid'<list id>'){site_url}/_api/web/lists/GetByTitle('List Title')<site url>/_api/web/lists


I believe this kind of situation should not occur in Microsoft's official documentation, and there should be a comprehensive RESTful API Swagger available for developers to refer to.

It's really frustrating that all four official documents have different SharePoint endpoint URLs......


Finally, I would like to request clarification on the following two points, which I believe are crucial for meeting my requirements:


1. What are the API permissions that need to be configured in the application?

2. What is the exact SharePoint endpoint URL that should be used?


I appreciate any guidance and support you can provide to help me address these issues.


Thank you for your attention to this matter.

0 Replies