Set multiple people picker value using REST API RRS feed

  • Question

  • I have the javascript code working where I have the list of users in an array called "UserIds". But I am getting error below, when I am making the REST call for posting the data.

    "A 'PrimitiveValue' node with non-null value was found when trying to read the value of a navigation property; however, a 'StartArray' node, a 'StartObject' node, or a 'PrimitiveValue' node with null value was expected.\"}}}","status":400,"statusText":"Bad Request"}

    createListItemWithDetails: function(listName, userIds, success, failure) {

                function(itemType) {
                    var item = {
                        "__metadata": { "type": itemType },
                        "elvlglENotificationId": {"results":userIds} //Is this right??
                                 var siteurl = _spPageContextInfo.webAbsoluteUrl;

                        url: siteurl + "/_api/web/lists/getbytitle('" + listName + "')/items",
                        type: "POST",
                        contentType: "application/json;odata=verbose",
                        data: JSON.stringify(item),
                        headers: {
                            "Accept": "application/json;odata=verbose",
                            "X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
                        success: function (data) {
                            success(data, false);
                        error: function (data) {
                       alert("Error: "+ JSON.stringify(data));
                            failure(data, true);


    Sunday, August 4, 2019 6:12 AM

All replies

  • Hi ViviSP,

    To set value People picker field in list using REST API

    var addNewItemUrl = "/_api/Web/Lists/GetByTitle('SpTest')/Items"; 
    var data = {
        __metadata: { 'type': 'SP.Data.SpTestListItem' },
        AuthorId: 3,
    function addNewItem(url, data) {
            url: _spPageContextInfo.webAbsoluteUrl + url,
            type: "POST",
            headers: {
                "accept": "application/json;odata=verbose",
                "X-RequestDigest": $("#__REQUESTDIGEST").val(),
                "content-Type": "application/json;odata=verbose"
            data: JSON.stringify(data),
            success: function (data) {
            error: function (error) {

    Note: For multi value people picker column pass int array inside people piker field.

    URL: SiteURL + /_api/web/lists/getbytitle('List Display Name')/items?$expand=Author&$select=Author/Id,Title
    Thanks & Regards,

    sharath aluri

    Sunday, August 4, 2019 7:07 PM
  • Hi,

    To update multiple user field by rest api, the user IDs should be like below.

    data: { "__metadata": { "type": "SP.Data.ListNameListItem" }, "Title": "Second Item", "PeopleFieldId": { "results": ["4", "7"] } };

    Here is the thread for your reference.

    Best Regards,


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, August 5, 2019 2:13 AM