Updating Multi User Field Values does not work with Rest API

Copper Contributor

Does any one tried to update the Multi User field value using Rest API. I am not able to set the value and I always get the following error if I try to set multi user field value: 

My request body is like this:

{"articleDate":"2017-10-27T22:00:00.000Z","articleContactsId":{"results":[31]}}

 

I also tried with 

{"articleDate":"2017-10-27T22:00:00.000Z","articleContactsId":{"results":["31"]}}

 

My response is: 

 

An unexpected 'StartObject' node was found for property named 'articleContactsId' when reading from the JSON reader. A 'PrimitiveValue' node was expected.

 

For single user field user, I can set the user for updating item and I get 204 response. If anyone has correct example for multi user, please share. 

 

1 Reply

Hi @Aruna Gottimukkala

 

I assume you ended us resolving this as the post is a few months old, but replying in case someone else finds it (it came up on top of my search results :) )

I have just tried this and I can confirm that both options below (using strings or numbers) are working for me, for both single and multi value people fields.

 

The only moment I saw the error message below was when I only passed the array as the field value, not an object with the "results" property.

 

On a side note, be aware that user IDs are different between sites, so if you get the IDs from a site and try to add to a field on a different site, those IDs may not exist or it will result on the wrong people being added.