Get Wiki Page content from SharePoint using Graph API

Anand KS 46 Reputation points
2021-11-16T17:25:45.513+00:00

Hello all,

I would like to fetch the page content of a wiki page , that is present in share point using the microsoft Graph API. I saw that there was an API to get the page content using this API endpoint from the beta version of the Graph API. But When I use this end point, I seem to get the meta info for the wiki page, but the webPart section of it always seems to empty. So I can't seem to extract any content from the wiki page.

Sample API Response for a Wiki Page :

{ "@odata.etag": "<page_etag_id>", "eTag": "<page_etag_id>", "id": "<page_id>", "lastModifiedDateTime": "<timestamp>", "name": "<page_filename>", "webUrl": "<page_url>", "title": "<page_title>", "createdBy": { "user": "<user_data>" }, "lastModifiedBy": { "user": "<user_data>" }, "parentReference": { "siteId": "<parent_site_id>" }, "contentType": { "id": "<content_type_id>", "name": "Wiki Page" }, "webParts": [], "publishingState": { "level": "published", "versionId": "1.0" } }

Is there any way we can get the content of the wiki page using Graph API ?

Microsoft 365 and Office SharePoint Development
Microsoft Security Microsoft Graph
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,126 Reputation points
    2021-11-17T01:43:46.283+00:00

    Hi @Anand KS ,

    Currently, getting the content of the wiki page is not supported using Graph API. You could submit the feature request here: https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/idb-p/Microsoft365DeveloperPlatform


    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.