You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Retrieve a SharePoint Online modern page via Microsoft Graph, using the beta endpoint, using the MS Graph Beta SDK. The page should be returned with content.
How is it failing?
Retrieving a site page (microsoft.graph.sitePage) via Pages returns just a base site page (microsoft.graph.baseSitePage), making it impossible to expand e.g. the canvasLayout property.
Here's how I'm retrieving the page, trying to expand canvasLayout:
This throws the exception Parsing OData Select and Expand failed: Could not find a property named 'CanvasLayout' on type 'microsoft.graph.baseSitePage'.
Note: I did not immediately find how to send the modified graphPageRequest and the batching approach is the first sample I found that worked. There might be an easier approach.
What's the goal?
Retrieve a SharePoint Online modern page via Microsoft Graph, using the beta endpoint, using the MS Graph Beta SDK. The page should be returned with content.
How is it failing?
Retrieving a site page (
microsoft.graph.sitePage
) viaPages
returns just a base site page (microsoft.graph.baseSitePage
), making it impossible to expand e.g. thecanvasLayout
property.Here's how I'm retrieving the page, trying to expand
canvasLayout
:This throws the exception Parsing OData Select and Expand failed: Could not find a property named 'CanvasLayout' on type 'microsoft.graph.baseSitePage'.
Looking at the generated request I see this:
https://graph.microsoft.com/beta/sites/_siteid_/pages/_pageId_?$expand=canvasLayout
But this should rather be:
https://graph.microsoft.com/beta/sites/_siteid_/pages/_pageId_/microsoft.graph.sitePage?$expand=canvasLayout
How to achieve this, using the Graph Client SDK?
Used for testing:
The text was updated successfully, but these errors were encountered: