Issue Updating Multi-Value Lookup Field in SharePoint List Item Using Microsoft Graph API

João Pedro da Mota Lawandovski 5 Reputation points
2025-04-30T02:22:28.32+00:00

Hello Everyone!

I'm encountering an issue when trying to update a multi-value lookup field in a SharePoint list item using the @microsoft/microsoft-graph-client library. My code successfully updates fields of type string and number, but I’m facing problems with a field of type array (multi-value lookup).

The field in question is called users, which references multiple IDs from another SharePoint list. Below is the field’s metadata:

{
  "columnGroup": "Custom Columns",
  "description": "",
  "displayName": "users",
  "enforceUniqueValues": false,
  "hidden": false,
  "id": "xxxxxx",
  "indexed": false,
  "name": "users",
  "readOnly": false,
  "required": false,
  "lookup": {
    "allowMultipleValues": true,
    "allowUnlimitedLength": false,
    "columnName": "ID",
    "listId": "xxxxxxx"
  }
}

Here’s the relevant code I’m using to update the list item:

const res = await client
  .api(`/sites/${siteID}/lists/${listId}/items/${itemId}`)
  .expand("fields")
  .patch({
    fields: updateData,
  });

The update works fine when I set a single value for the users field. However, when I attempt to update it with multiple IDs (e.g., [9, 12]), the request completes without errors, but the field does not update in SharePoint.

I’ve tried several formats for the updateData payload. My most recent attempt sugested by copilot was:

updateData = {
  "users": {
    "@odata.type": "Collection(SP.FieldLookupValue)",
    "results": [
      {
        "LookupId": 9
      },
      {
        "LookupId": 12
      }
    ]
  }
};


Despite this, the field still doesn’t update. I’ve also experimented with other formats, such as passing an array of IDs directly, but none have worked for the multi-value case.

Could you please provide guidance on the correct payload format for updating a multi-value lookup field using the Microsoft Graph API? Any examples or documentation references would be greatly appreciated.

Microsoft Security | Microsoft Graph
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. EVGENY FILICHEV 0 Reputation points
    2025-08-07T06:30:50.97+00:00

    Hello there!

    To update SharePoint Lookup column that allows multiple values there are 2 things to keep in mind:

    1. You need to use column name with 'Id' postfix, in your case you should use 'usersId' as the property value
    2. Results should be passed as the OData collection with Edm.Int32 array item type (you do not need to specify the type in your payload, though), which means that your request payload should look like this:
    updateData = {
      "usersId": {
        "results": [ 9, 12]
      }
    };
    

    Same thing applies for updating the SP list item from the SPFx web part or component.

    0 comments No comments

Your answer

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