microsoftgraph / msgraph-metadata

Microsoft Graph metadata captured and used for generating client library code files.
https://graph.microsoft.com
MIT License
105 stars 33 forks source link

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

Open heinrich-ulbricht opened 10 months ago

heinrich-ulbricht commented 10 months ago

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)