Microsoft 365 : New Feature – Microsoft Graph API for SharePoint pages is now generally available

Hi All,
Greetings for the day
Today new feature update related to Microsoft Graph.
New Feature : Microsoft Graph API for SharePoint pages is now generally available
Details
- The Microsoft Graph API for SharePoint pages is now generally available
- Graph API for SharePoint pages provides us tools to interact with SharePoint Pages and News posts
- These APIs includes following capabilities
- Creating pages
- Editing pages
- Deleting pages
- Listing pages
- Getting page
New features incorporated
- Web part support for create & edit – 14 following webparts are supported for creating / editing pages
| Text Web part | Image | Image Gallery | Button |
| Call to Action | Divider | Document embed | Link preview |
| Quick links | People | Bing maps | Spacer |
| YouTube embed | Org chart |
Demo with Graph Explorer
- List all site pages from given site
GET /sites/{site-id}/pages
Output (showing for one page) : Note the properties it returns
{
"@odata.type": "#microsoft.graph.sitePage",
"@odata.etag": "\"{5ED26C19-9E78-494E-9A06-9F5CD1161ABF},10\"",
"createdDateTime": "2023-08-10T03:41:38Z",
"eTag": "\"{5ED26C19-9E78-494E-9A06-9F5CD1161ABF},10\"",
"id": "5ed26c19-9e78-494e-9a06-9f5cd1161abf",
"lastModifiedDateTime": "2023-08-10T03:41:45Z",
"name": "Testing-sharing-site.aspx",
"webUrl": "https://knowledgejunction1.sharepoint.com/SitePages/Testing-sharing-site.aspx",
"title": "Testing sharing site",
"pageLayout": "article",
"thumbnailWebUrl": "https://media.akamai.odsp.cdn.office.net/knowledgejunction1.sharepoint.com/_layouts/15/images/sitepagethumbnail.png",
"promotionKind": "newsPost",
"showComments": true,
"showRecommendedPages": false,
"contentType": {
"id": "0x0101009D1CB255DA76424F860D91F20E6C41180026B0C27E6CA4254D840A75710721FCCF",
"name": "Site Page"
},
"createdBy": {
"user": {
"displayName": "Prasham Sabadra",
"email": "prasham@knowledgejunction1.onmicrosoft.com"
}
},
"lastModifiedBy": {
"user": {
"displayName": "Prasham Sabadra",
"email": "prasham@knowledgejunction1.onmicrosoft.com"
}
},
"parentReference": {
"siteId": "237c32a1-0683-4fbf-ae85-d0231608241e"
},
"publishingState": {
"level": "published",
"versionId": "1.0"
},
"reactions": {},
"titleArea": {
"enableGradientEffect": true,
"imageWebUrl": "/_layouts/15/images/sleektemplateimagetile.jpg",
"layout": "overlap",
"showAuthor": true,
"showPublishedDate": false,
"showTextBlockAboveTitle": false,
"textAboveTitle": "",
"textAlignment": "left",
"imageSourceType": 2,
"title": "Testing sharing site",
"authorByline@odata.type": "#Collection(String)",
"authorByline": [
"i:0#.f|membership|prasham@knowledgejunction1.onmicrosoft.com"
],
"titlePlaceholder": "Name your news post",
"isDecorative": true,
"hasTitleBeenCommitted": true,
"authors@odata.type": "#Collection(microsoft.graph.Json)",
"authors": [
{
"id": "i:0#.f|membership|prasham@knowledgejunction1.onmicrosoft.com",
"upn": "prasham@knowledgejunction1.onmicrosoft.com",
"email": "prasham@knowledgejunction1.onmicrosoft.com",
"name": "Prasham Sabadra",
"role": "Architect"
}
],
"serverProcessedContent": {
"htmlStrings": [],
"searchablePlainTexts": [],
"links": [],
"imageSources": [
{
"key": "imageSource",
"value": "/_layouts/15/images/sleektemplateimagetile.jpg"
}
]
}
}
}
Permissions required to work with pages
- Sites.Read.All – least privileged permission

Microsoft 365 Roadmap ID – 101166

REFERENCES
- sitePage resource type – https://learn.microsoft.com/en-us/graph/api/resources/sitepage?view=graph-rest-1.0
- Open issues and provide feedback in SharePoint Pages Graph API issues list.
In next article we will try CRUD operations using Graph Explorer.
Thanks for reading ! HAPPY LEARNING ! LIFE IS BEAUTIFUL 🙂

You must be logged in to post a comment.