Graph api to retrieve SharePoint list items not returning id in fields when requested in expand option since 7th

Derek Papworth 0 Reputation points
2023-02-08T13:15:12.48+00:00

We use a number of calls in a number of apps and functions that retrieve details from SharePoint lists and we include the "id" in the expand option for fields so that JSON deserialising will correctly create a model including the "id" and all has been working fine for months, in fact couple of years. But yesterday we started to experience issues in a number of places and when investigating it appears that the "id" is now not being returned in the "fields" JSON return and are apps & functions are aborting with exceptions as it's value is null.

This only started yesterday (7th Feb) so I'm assuming some change/version has been implemented yesterday that's causing this issue .. has anyone else experienced problems or is aware of change having been implemented yesterday?

Thanks Derek

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,496 Reputation points Microsoft External Staff
    2023-02-09T06:31:30.04+00:00

    Hi @Derek Papworth,

    Per my test, I can retrieve item id by following graph api

    GET https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items?expand=fields(select=Column1,Column2)
    
    

    Here is the test result

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.