Q:

How do I update the value of Person or Group columns in SharePoint lists using the Microsoft Graph API?

My situation
I am using the Microsoft Graph API (Beta) to update SharePoint ListItems. However, I am failing to change the value of a 'Person or Group' column. The column has the attribute 'Allow multiple selections' and accepts both persons and groups. This is how it looks like as part of the ListItem columnSet:
{ 
  "AssignedTo": [
    {
      "Email": "user@domain.com", 
      "LookupId": 123, 
      "LookupValue": "User Name"
    }
  ]
}

What works
Updating the value of columns other than 'Person or Group' is working fine: As documented, I am sending a PATCH request to the ListItem's columnSet. The request header contains the content type 'application/json' and the request body contains a JSON-encoded dictionary of column names and their (new) values:
{
  "RegularColumn": "new value"
}

What does NOT work
I have experimented quite a bit with using the user's id, email and/or name, but all I get is this error: 'The request is malformed or incorrect.'
How can I update the value of a 'Person or Group' column? How would a sample JSON request body look like?
Thanks for any suggestions!

A:

I have been looking for a solution to the same issue for quite a while and did not find any solutions on StackOverflow or the web. Thanks to the post from Vadim Gremyachev (See the related question regarding fields of type 'lookup' here), I was able to successfully update a field of type 'personOrGroup' with the activated setting 'allowMultipleSelection' via the Graph Api. You can update single value 'personOrGroup' fields, by combining the field name with LookupId and passing the LookupId as the value:
{
   "AssignedToLookupId":"123"
}

If you want to update a multi value 'personOrGroup' fields, you need to specify the data type first and pass the ids as an array:
{
   "AssignedToLookupId@odata.type":"Collection(Edm.String)",
   "AssignedToLookupId":["123", "124"] 
}

