How to get List items using clientid and client secret

Saravanan Ponnusamy 20 Reputation points
2024-11-15T12:33:41.67+00:00

So, I have the Client ID and Client Secret for the SharePoint site. Using these, I am able to create the access token. However, when I use this access token to fetch list items, I receive an empty array, even though the SharePoint list contains values. The item count is displayed correctly, but I can't fetch the list values. What could be the issue here?
User's image
User's image

User's image

User's image

Microsoft 365 and Office | SharePoint | Development
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 51,941 Reputation points Microsoft External Staff
    2024-11-18T10:06:06.96+00:00

    Per my test, I also received an empty array by using access token to fetch list items in the Postman. No specific content will be displayed by using this method, this is by design.

    As a workaround, you can add SP REST JSON Extensions to google chrome. Then get results directly by using google chrome.

    3

    Here are results:

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.