msgraph-metadata icon indicating copy to clipboard operation
msgraph-metadata copied to clipboard

[SharePoint, Site Pages] Add parent library ID to parentReferences member

Open heinrich-ulbricht opened this issue 7 months ago • 0 comments

Context

When working with SharePoint lists and items different IDs are needed by different APIs. Site ID, Web ID, Item ID, Item Unique ID, relative URL etc.

There is the extreme convenient sharepointIds member that gets populated for some endpoints. But not for pages (beta API).

Observed behavior

The parentReference property of site pages only contains the siteId.

Example:

GET /beta/sites/6bbd66bf-79e9-4d81-a6a4-979be127794d/pages?$select=parentReference

image

Expected behavior

The parentReference property of site pages should contain the ID of the parent Site Pages library as well, if requested.

Ideal would be if the sharepointIds property of the parentReference would be populated:

image

For sites this is populated like so:

image

This shouldn't be returned by default, but upon request.

(I tried this, but get a 400: https://graph.microsoft.com/beta/sites/6bbd66bf-79e9-4d81-a6a4-979be127794d/pages?$select=parentReference,parentReference/sharepointIds. I also tried this, for single pages, as it works for sites, but does not: https://graph.microsoft.com/beta/sites/6bbd66bf-79e9-4d81-a6a4-979be127794d/pages/af4fca6a-6371-4a77-b1fb-e32c97cd7ba5/sharepointIds)

heinrich-ulbricht avatar Jan 17 '24 21:01 heinrich-ulbricht