Skip to content

Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Problems
  • Triggers
  • Application specific solutions
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Resources
Menu

How to easily update SharePoint people picker column in Power Automate

Posted on May 23, 2021May 23, 2021 by Tom

“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.

Method: POST

Uri: _api/web/lists/GetByTitle('<ListName>')/items(<ItemID>)/validateUpdateListItem

Body:
{
    "formValues":[
	{
	    "FieldName": "<FieldToUpdate>",
	    "FieldValue": "<ValueToUpdate>"
	}
    ]
}

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.

"FieldValue": "[{'Key':'claims'}]"

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.

"FieldValue": "[{'Key':'claims'},{'Key':'claims'}]"

What is claims?

Claims is a user identifier consisting of a prefix and an identifier: email for users and ID for M365 groups. The prefix depends on the type of user, as shown in the table below.

User typePrefix
Useri:0#.f|membership|
M365 groupc:0o.c|federateddirectoryclaimprovider|

As an example, the “FieldValue” below will update 1 M365 group and 1 user into the people picker.

"FieldValue": "[{'Key':'c:0o.c|federateddirectoryclaimprovider|691a0c9d-xxxx-44e8-yyyy-d6df6cd591e8'},{'Key':'i:0#.f|membership|xxx@tomriha.com'}]"
update SharePoint people picker Power Automate

How to get user claims?

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.

Summary

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.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

3 thoughts on “How to easily update SharePoint people picker column in Power Automate”

  1. Divya says:
    October 11, 2021 at 3:42 pm

    Hi can i know the same process for Sharepoint group.

    Reply
    1. Tom says:
      October 17, 2021 at 9:42 am

      Hello Divya,
      for SharePoint group use the group name instead of claims login as the FieldValue, e.g.
      “FieldValue”: “[{‘Key’:’SharePoint group name’}]”

      Reply
  2. Dayve says:
    January 4, 2022 at 7:36 pm

    Thank you a million times over.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Now available:

The Ultimate Power Automate expressions cheat sheet
Equip yourself with the tool to translate your thoughts into Power Automate expressions!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Hello and welcome!

My name is Tom and I'm a business process automation consultant and Microsoft MVP living in the Czech Republic. I’ve been working with Microsoft technologies for almost 10 years, currently using mainly Power Automate, SharePoint, Teams, and the other M365 tools.

I believe that everyone can automate part of their work with the Power Automate platform. You can achieve a lot by "clicking" the flows in the designer, but you can achieve much more if you add a bit of coding knowledge. And that's what this blog is about.

To make the step from no-code Power Automate flows to low-code flows: using basic coding knowledge to build more complex yet more efficient flows to automate more of your daily tasks.

  • Format results of date calculation in SharePoint columnJune 29, 2022
  • Why is your Power Automate flow creating duplicatesJune 26, 2022
  • How to create a unique identifier in your Power Automate flowJune 22, 2022
  • How to assign custom SharePoint permission level with Power AutomateJune 19, 2022
  • Remove permissions from a specific SharePoint user with Power AutomateJune 15, 2022

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

© 2022 Let's POWER Automate | Powered by Superbs Personal Blog theme