How can I get the Section headers (title/displayName) from Sharepoint pages using Graph Api ?

Anto Thomas 20 Reputation points
2024-07-03T14:13:06.2266667+00:00

When I use the endpoint as shown below the information about Section headers seems to be missing.

GET /sites/{site-id}/pages/{page-id}/microsoft.graph.sitePage/webparts


For eg. These information can't be seen on the response.

SP.jpg

If not by Graph API , is there any other way (SP API) ?

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

Accepted answer
  1. Xyza Xue_MSFT 25,546 Reputation points Microsoft Vendor
    2024-07-04T06:45:00.7733333+00:00

    Hi @Anto Thomas ,

    Thank you for posting in this community.

    I found that at most I can only get the inner html of the webpart in the section. Regarding section, the official does not provide more attributes for this API for us to use.

    As you mentioned, SharePoint REST API. It is also only works for simple pages that have plain text. Nor can get Section name.

    And I noticed that some end users have also proposed the same request, it is highly recommended that you can vote this ticket. Many features of our current products are designed and upgraded based on customers’ feedback. With requirements like this increase, the problem may well be released in the future. Thanks for your understanding.

    User's image

    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.


0 additional answers

Sort by: Most helpful

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.