web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :

HTTP Request to SharePoint - Join People Claims for Multi-Person Picker Field

RachelSchulz09 Profile Picture RachelSchulz09
Scenario: You want to fill or update a multiple person field on a SharePoint list or library using the Send an HTTP request to SharePoint action, and you are pulling the information from another list, library, or other item.
 
It's relatively easy to find information on how to construct the JSON from a web search:
 
{
  "formValues": [
    {
      "FieldName": "YourColumnInternalName",
      "FieldValue": "[{'Key':'i:0#.f|membership|user1@domain.com'},{'Key':'i:0#.f|membership|user2@domain.com'}]"
    }
  ]
}

 
But if you are filling the field with dynamic content, constructing the FieldValue may prove difficult - because this format requires the use of single quotes, not double quotes, inside the bracket.
 
In my situation, I was pulling items from an approver list and filtering by a field, using Select to get just the claims, and appending to a string variable that I used for the Field Value. The formula for the string was constructed as follows:
 
join(body('Select_-_FTB_Reviewer'),',')
 

 
What I found was that this yielded a result for the FieldValue like the following, which always failed.
 
{"Key":"i:0#.f|membership|user1@domain.com"},{"Key":"i:0#.f|membership|user2@domain.com"}
 
Ultimately, the solution is to add a replace function outside the join function, to replace the double quotes with single quotes. There is a special way to do this, which is to use four single quotes as the replacement as follows:
 
replace(join(body('Select_-_FTB_Reviewer'),','),'"','''')
 

Comments