How to retrieve the Comments in a SharePoint Site Page using Graph API?

Adz 286 Reputation points
2023-04-04T16:28:05.66+00:00

I am attempting to retrieve the Comments that are posted on a SharePoint Site Page I am able to retrieve the webContents like so

GET /beta/sites/{siteId}/pages/{pageId}/webparts

However I am unable to see the Comments. Is this only doable using the old SharePoint APIs? Thanks comment

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,839 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,868 questions
0 comments No comments
{count} votes

Accepted answer
  1. HarmeetSingh7172 4,811 Reputation points
    2023-04-05T00:02:54.1133333+00:00

    Hello Adz, Thanks for reaching out! As per my knowledge, there is no Graph API endpoint to retrieve the comments of a SharePoint site page using Graph API.
    You may try to use SharePoint Rest API to get the comments.

    /_api/lists/getbytitle('Site Pages')/items(pageID)/comments
    

    Refer this similar post: https://learn.microsoft.com/en-us/answers/questions/326830/site-page-comments-extraction-in-sharepoint-using For latest updates/changes to graph APIs, you can refer to this Changelog Portal. Hope this helps. If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful