Graph API to update a custom Person field

Raga 0 Reputation points

Dear Friends,

We are using Graph API - PATCH /sites/{site-id}/lists/{list-id}/items/{item-id} to update a field name of files in sharepoint and there is a field "Test User" of type Person. We are unable to update via the API. We tried passing below payload

  "fields": {
    "TestUser": "abc...-efg..-...."

This did not work. I update field from sharepoint and tried GET and observed a field "TestUserLookupId": numeric e.g. 400

I do not know how to get or convert the OID into this numeric value. Get User does not have. this field.

Kindly Help.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,383 questions
{count} votes