cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Cam
Kudo Commander
Kudo Commander

Update Multi People Picker Column with SharePoint HTTP Action

hello everyone 🙂

 

I'm having alot of trouble updating a People Picker column in a SharePoint Document Library using the Send an HTTP request to SharePoint action.

 

I'm using SharePoint Online.

The name of the Document Library is DCR.

 

Here are the settings on the column:

- field name = ProcessOwners

- required = yes

- allow multiple selections = yes

- allow selection of = people and groups

- choose from = all users

Cam_0-1642492774362.png

 

Here is what the column looks like:

Cam_2-1642493363868.png

 

here is my Send an HTTP request to SharePoint action:

Cam_3-1642493685030.png

 

easier to read body:

Cam_4-1642493788593.png

 

the file ID is 101

Cam_5-1642493897845.png

 

when i test the flow, it says it is successful

Cam_6-1642493968672.png

 

buttt the ProcessOwners column doesnt change.

 

I really want to use the 'Send an HTTP request to SharePoint' action,

i don't want to use the 'Update file properties' action

(i have a tonne of required columns in this library, and only want to edit one specific column)

 

do anyone know what is going wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @Cam,

 

You could use the validateUpdateListItem method and in that case you just have to use the Claims value in the body of the POST request. @tom_riha has written a great blog about updating a person field with this method:

https://tomriha.com/how-to-easily-update-sharepoint-people-picker-column-in-power-automate/

 

Below is an example:

 

URI

_api/web/lists/GetByTitle('DCR')/items(101)/validateUpdateListItem

 

Body

{
    "formValues":[
	{
	    "FieldName": "ProcessOwners",
	    "FieldValue": "[{'Key':'i:0#.f|membership|johndoe@contoso.com'},{'Key':'i:0#.f|membership|janedoe@contoso.com'}]"
	}
    ]
}

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @Cam,

 

You could use the validateUpdateListItem method and in that case you just have to use the Claims value in the body of the POST request. @tom_riha has written a great blog about updating a person field with this method:

https://tomriha.com/how-to-easily-update-sharepoint-people-picker-column-in-power-automate/

 

Below is an example:

 

URI

_api/web/lists/GetByTitle('DCR')/items(101)/validateUpdateListItem

 

Body

{
    "formValues":[
	{
	    "FieldName": "ProcessOwners",
	    "FieldValue": "[{'Key':'i:0#.f|membership|johndoe@contoso.com'},{'Key':'i:0#.f|membership|janedoe@contoso.com'}]"
	}
    ]
}

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


you sir, are a legend!

here is the action - and it works!

Cam_0-1642552487289.png

 

=========

 

note, if anyone else gets the "Value cannot be null" error message in Power Automate, please see this thread to fix it:

https://powerusers.microsoft.com/t5/Using-Flows/Sharepoint-Post-Request-ValidateUpdateListItem/td-p/...

 

you need to make sure the headers on your HTTP action are similar to mine.

(as Reza has suggested)

 

get rid of the x-http-method header... it was causing me to get that error.

 

 

thank you @Expiscornovus 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,632)