It is not a problem. The question is how to update a people field (single or multiple) in Power Automate using “Send an HTTP request to SharePoint” REST api?
To simplify the solution here are three fields in the SharePoint list. Let’s use a default template ‘When an item created’ trigger to update the first field OneApprover and MoreThanOneApprovers fields.
We have three test users
Step by Step solution
Step # 1
Use the following in the “Uri” field, note the email address and select of an ID.
NOTE: Please use Scope so that you can combine all the repetitive actions in one to get IDs.
Note: Output of the above action will be following. We need to access the 'Id' value.
Note: to access the Id value we will use the following formula in the Compose
Step # 2
Now that we have an IDs of all there users we can call the POST method to update the two fields in the list.
Note: In the Uri field you will provide the following. This will invoke the call for the current list item,
Note: In the headers section you will provide the following json.
TIP: click on the “T” circled as res to get in the text mode to copy and paste.
Now very important step i.e. to update people field.
1: Update the list name from ‘PeopleFieldDemo’ to your list name.
2: The Compose outputs are IDs of the users. They are typically an integer values. You need to put your values.
3: Please make a note the single field is just assign one value with multiple it is an array
4: Notice the field name “OnePrrover” and “MoreThanIneApprover” there is a “Id” suffix.
The output of the list item will look like this in my case the IDs I have assigned.
|SHAREPOINT REST WALL PAPER||https://www.microsoft.com/en-us/download/details.aspx?id=41147|