How to easily update SharePoint people picker column in Power Automate
Posted On May 23, 2021
“Can I use ‘Send an HTTP request’ to update only people picker SharePoint column with Power Automate? My request doesn’t update anything!”
When you search for solution to update SharePoint people picker column, you’ll probably end up with an HTTP request using the user ID. You’ll be asked to get the user ID first, and then update the item using that ID. That’s one HTTP request to get it, then process the result, and finally update the item. It’s not the most straightforward solution.
I believe it’s much easier to use an HTTP request with validateUpdateListItem. It’s the same request you use to update a single SharePoint column, but with different body.
HTTP request to update people picker column
The action you’ll need is the ‘Send an HTTP request to SharePoint’ with the configuration below.
Note: < … > are placeholders, replace them including the < and >.
The difference between a people picker and the other SharePoint columns is in the <ValueToUpdate> part. In the other situations you’d just enter the field value, but people picker needs a specific format for the value. An array with pairs of key ‘Key’ and value ‘claims’ values.
And since it’s an array, you can use the same format to update also multiple users in the people picker, just extend the array.
If you’re taking a user from somewhere within SharePoint, you can get his claims directly from the dynamic contents. It’s the ‘Column Claims’ value. If the user is not from SharePoint, you must build the value manually by adding the prefix to the user email.
How to get M365 group claims?
M365 groups don’t provide such an option, you can’t get the claims directly. You must always build the claims by yourself using the prefix and the group ID.
If you don’t know what ID the M365 group has, you can get it with the steps below. The prerequisite is that you must be member of the group you’re trying to add.
Then you can ‘List groups that I own and belong to’, ‘Filter array’ to get only the specific group by its name, and then use the ‘Group Id’ to build the claims.
It might be challenging to update only a single people picker SharePoint column with Power Automate. It’s not as easy as updating the other columns, or e.g. renaming a file, but it’s not complicated either.
Once you understand the body of the request, you can easily build the array and update the right user(s)/group(s) into the column.