by Dany


In this post, we are going to demonstrate how to create a Flow (using Power Automate) that updates a SharePoint people picker field using the “Send a HTTP request to SharePoint” action.

The Flow will update the following people picker fields

  • Requester: will be set to modified by field
  • Manager: will be set from requester manager in case the manager does not exist will set to empty
  • Assigned To: this is a multiple value field; we will get the values from a multi value people picker field in another list. In case no values are retrieved. We will set to empty

Before we start, it is important to mention that when using REST API, the People and Group field will be returned as “FieldNameId”. The format for user field value:

  • single-valued user field: ‘<user field name>Id’ : <user id>
  • multi-valued user field: ‘<user field name>Id’ : { ‘results’: [<array of user ids>] }

To empty the fields

  • single-valued user field: ‘<user field name>Id’ : -1
  • multi-valued user field: ‘<user field name>Id’ : { ‘results’: [0] }

Initialize Variables

So now let us go to our Flow and start by creating the needed variables. Note that it is not necessary to create these variables, but it will make the Flow more readable and maintainable.

Get Requester Id

As mentioned, to update a people picker field we need the Id of the user. At the time of writing, Flow does not support a way to retrieve user Id, so we must get it using the Rest API.

We can use the following Rest API to get site user information:

  • _api/web/SiteUsers/getByEmail(‘UserEmail‘)

Get Manager Id

Now let’s get the manager for the requester.

Get AssignedTo Id

Update Item – Set Requester, Manager, AssignedTo

Update item using Send an HTTP request to SharePoint action set as following:

  • Method: Post
  • Uri: _api/lists/getbytitle(‘@{replace(variables(‘ListTitle’), ‘ ‘, ‘%20′)}’)/items(@{int(triggerBody()?[‘ID’])})
  • Headers:

"Accept": "application/json;odata=verbose",

"Content-Type": "application/json;odata=verbose",

"X-HTTP-Method": "MERGE",

"IF-MATCH": "*"


Remove highlighted in case of add item
  • Headers:

"__metadata": {

"type": "[email protected]{replace(variables('ListName'),' ','_x0020_')}ListItem"


"RequesterId": "@{variables('RequesterId')}",

"ManagerId": "@{variables('ManagerId')}",

"AssignedToId" : @{variables('AssignedCCId')}

(Visited 7,946 times, 43 visits today)

About the author 


Leave a Reply

  1. Hi Dany, Thanks for sharing, your solution fits my requirements. I am finding issue adding the array items in to the new List for example, "AssignedToId" : @{variables('AssignedCCId')} it gives me error. how do i only get the Ids using POST http request.

    "EngagementTeam": {'results':[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser","Claims":"i:0#.f|membership|…………"},615,333,592]}

    A node of type 'PrimitiveValue' was read from the JSON reader when trying to read the entries of a feed. A 'StartObject' or 'EndArray' node was expected.
    clientRequestId: 46e0f9c3-681a-41fc-bb1a-3f94d70bbe86
    serviceRequestId: 8a41d29f-20a3-c000-4d82-b1268a55a33d

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

2 Free Ebooks: How to govern Microsoft teams 

Download your 2 free Microsoft Teams governance Ebooks and learn the steps necessary to create a bullet-proof governance strategy.