I have a SharePoint Online list with multiple people fields, including one for Project Manager. Using PowerShell graph module commands, or the graph APIs directly, if I retrieve a single list item where this field is populated I can retrieve the Project Manager Lookup Id from the field list. However, if I retrieve all list items at once, this field is not included for any of the returned list items and I don’t know why.
I’ve tried several variations of the expand-property parameter with no luck.
For a specific list item these all include the Project Manager Lookup Id in the result as expected
https://graph.microsoft.com/beta/sites/$siteId/lists/$listId/items/$($itemId)?expand=fields
https://graph.microsoft.com/beta/sites/$siteId/lists/$listId/items/$($itemId)?expand=fields(select=*)
https://graph.microsoft.com/beta/sites/$siteId/lists/$listId/items/$($itemId)?expand=fields(select=Title,ProjectManagerLookupId))
If I use the same URIs without the item specified (i.e. to retrieve all list items0, Project Manager Lookup Id is not included for any of the list items
https://graph.microsoft.com/beta/sites/$siteId/lists/$listId/items?expand=fields
https://graph.microsoft.com/beta/sites/$siteId/lists/$listId/items?expand=fields(select=*)
https://graph.microsoft.com/beta/sites/$siteId/lists/$listId/items?expand=fields(select=Title,ProjectManagerLookupId))
Matt Tebbs is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.