How to fetch list items from sharepoint using clientid and client secret?

Saravanan Ponnusamy 20 Reputation points
2024-11-15T16:11:04.66+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

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,060 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Xyza Xue_MSFT 25,656 Reputation points Microsoft Vendor
    2024-11-18T09:56:04.38+00:00

    Hi @Saravanan Ponnusamy ,

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

    As a workaround, you can add SP REST JSON Extensions to google chrome.

    User's image

    Get results directly using your browser, you can see the specific content of each item in the list :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 Answers by the question author, which helps users to know the answer solved the author's problem.