MS Graph: Cannot update Person or Group Field in Sharepoint list

Anonymous
2021-02-10T18:53:09.343+00:00

I am trying to update the contents of a person or group field of a specific item in a Sharepoint list. However searching through the docs I could not find any examples, so I created a flow that does just that to take a look at the code. Pasting the code into MS Graph Explorer returns a 200 but does not change anything. Updating fields like the title, links or whatsoever work. I am using a PATCH request with the url:

https://graph.microsoft.com/v1.0/sites/XXXXXXXXX/lists/MYLIST/items/4

and the following body:
{
"MYPERSONORGROUPFIELD": [
{
"Claims": "someuser@Company portal .com"
}
]
}

Microsoft Security | Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Deva-MSFT 2,276 Reputation points Microsoft Employee Moderator
    2021-02-12T14:23:45.657+00:00

    Say, you have field "Category" then if it's lookup field is single, then you want to try the below and see if it helps.

    Url: https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/{item-id}/fields
    Method: PATCH
    Body: {
    "CategoryLookupId": "1"
    }


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.