4

I am using MS documentation mentioned at "https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/listitem_update".

All other types of fields are getting updated but user and taxonomy fields always fail.

Please note that I have also tried to give same json item for user/taxonomy field for update which comes out after any other successful update request.

For Example: all of the below listed attempts failed.

PATCH https://graph.microsoft.com/beta/sites/{site-id}/lists/{list-id}/items/{item-id}/fields Content-Type: application/json

{ "Color": "Fuchsia", "Quantity": 934, "Owner1": "Himanshu Pandey",//this fails "Owner2": "Himanshu Pandey|(guid for User)",//this fails "Department1": "Human Resource", //this fails "Department2": "Human Resource|(guid for human resource item)",//this fails }

1

Take a look here: https://stackoverflow.com/questions/45707051/create-sharepoint-list-item-with-lookup-field-with-microsoft-graph/51242644#51242644

The answer: This works with people fields where the multiple selection option is DISABLED. So if you have a person field which allows one person only, the following works.

"{columnName}LookupId": id

Additionally, the id still needs to be the SP ID and not the graph user GUID. This ID changes from site to site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.