web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 0wVejpUyjRT8NJqZCRGhyj
Power Automate - Building Flows
Answered

Rest API Multiple Person Field

Like (0) ShareShare
ReportReport
Posted on 14 Apr 2020 03:07:18 by 1,681 Moderator

Trying to use flow action send HTTP request to update a multiple person field in a sharepoint list. The list item was created previously and I want to update the list item field when based on a previously defined trigger. 

 

API URI

https://xxx/sites/xx/Departmental_xxx_xxxs/_api/web/lists/getbytitle('BI_xxx_Collector')/items('25')

 

Headers:

{
  "accept""application/json;odata=verbose",
  "content-type""application/json;odata=verbose",
  "If-Match""*"
}

For simplicity, I've hard coded two user ids into the body.

{
"__metadata": { "type": "Collection(Edm.Int32)" },
Assigned_ToId: { "results": ["36","42"] }
};

 

 

 

I get this error message :

{
  "status"400,
  "message""Incompatible type kinds were found. The type 'Collection(Edm.Int32)' was found to be of kind 'Collection' instead of the expected kind 'Entity'.\r\nclientRequestId: 920d0cfd-4eac-443c-a644-c71781a0ad6a\r\nserviceRequestId: 2c8c489f-3043-a000-2df7-4b8a70b333f6",
  "source""https://*/sites/*/Departmental_Report_Lists/_api/web/lists/getbytitle('BI_Request_Input_Collector')/items('25')",
  "errors": [
    "-1",
    "Microsoft.SharePoint.Client.InvalidClientQueryException"
  ]
}
 
any ideas on how to make this work? I've done several iterations of this code, and this is the closest i've come to a working script. Any help would be greatly appreciated.
  • srduval Profile Picture
    1,681 Moderator on 14 Apr 2020 at 11:13:35
    Re: Rest API Multiple Person Field

    Thanks @v-bacao-msft  your link is what I've been searching for since I started this flow. @sudharsan1985  you got me 1/2 way there so thanks as well.

  • Verified answer
    v-bacao-msft Profile Picture
    on 14 Apr 2020 at 05:44:26
    Re: Rest API Multiple Person Field

    Hi @srduval ,

     

    Please try to refer to the following article to create HTTP request:

    updating-a-multi-people-field-in-sharepoint-with-microsoft-flow

    Then you could check this similar thread to get the correct value of the type:

    Flow-Error-Send-HTTP-Request-to-SharePoint-to-Clear-out-a-Person

    Please take a try again and check if the issue still exists.

     

    Best Regards,

     

  • sudharsan1985 Profile Picture
    1,325 on 14 Apr 2020 at 05:03:13
    Re: Rest API Multiple Person Field

    Hi @srduval 

    The '__metadata' should follow the below structure with the list entity name

    '__metadata': { 'type': 'SP.Data.Mandatory_x0020_ReadsListItem' }

    My list name is 'Mandatory Reads', you can find the entity name of the list by using the below url and replace the siteurl and 'List Title'

    https://<siteurl>/_api/web/lists/GetByTitle('List Title')?$select=ListItemEntityTypeFullName

    You have to pass the Id's of the people as an integer array not string array.

    Try the above, it should work

     

     

    Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
    -Sudharsan K...

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete