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 :
Power Platform Community / Forums / Power Automate / How to patch a multi-p...
Power Automate
Answered

How to patch a multi-person field from one SharePoint list to another?

(0) ShareShare
ReportReport
Posted on by 158

I would like to patch a multi-person field in one list with the values of a multi-person field in another list.

 

patch rfi.PNG

Tried pulling from list directly, keeps sticking it in apply to each.

Tried creating an array variable, doesn't show up to insert into body.

Is there not a way to do this in one shot?

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi @bdc604 ,

     

    To save multiple person column value from one list to another, please check if the following way will work for you.

     

    Add trigger When an item is created in List33.

     

    Initialize variable, Name: Test, Type: String.

    Initialize variable2, Name: Test1, Type: String.

    Initialize variable3, Name: Test2, Type: String, Value: ;

     

    Add Apply to each, select from the multiple selection enabled person or group column.

     

    Within the Apply to each, add the following actions:

    Set variable: Name: Test2, Value: variables(‘Test1’)

    Set variable2: Name: Test, value: dynamic content Mpwerson Email from the trigger.

    Set variable 3: Name: Test1, value: concat(variables('Test2'),';',variables('Test'))

     

    Under apply to each, add action Create item to create the item in another list11. Select dynamic content variable Test for the Mulperson Claims field.

    1.PNG2.PNG3.PNG

     

    Best regards,

    Mabel

     

  • bdc604 Profile Picture
    158 on at

    Patching, not updating using update item. More like this...

     

    {
    '__metadata': {'type': 'SP.Data.SettingsListItem'},
    AdminsId: {'results': [24,25]}
    }

     

    Problem 2: I can get my admins as an array, but converting to string using compose is problematic.

    Compose produces {"Id":24},{"Id":25} instead of the numeric string I need as shown above.

  • Verified answer
    v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi @bdc604 ,

     

    If you want to patch the item from List1 to List2, please check the following flow for a reference.

     

    Before we create multiple users with Rest API, we need to get the User Principal ID for that.

     

    So we need to use two Send an HTTP Request to SharePoint actions, one for getting the User ID, one for creating the item in a list.

     

    Besides, we also need to initialize variables for the User ID.

     

    After the trigger, add action Initialize variable, Name to Id, Type to Array.

     

    Within the apply to each, add action Append to array variable, set its value to the following code:

     

    body('Send_an_HTTP_request_to_SharePoint')['d']['id']

     

     

    Under the Apply to each, add a Compose action, set its value to:

    variable('id')

     

     

    Then the last Send an HTTP request to SharePoint action to create the item in another list.

    Configure the Body likes below:

     

    {
    
      "__metadata":{type:"SP.Data.List33ListItem"},
    
       MpersonId:{'results':@{outputs('Compose')}}
    
    
    
    }

     

     

    1.PNG2.PNG

     

     

    Best regards,

    Mabel

     

  • PowerUser6 Profile Picture
    67 on at

    Hello @v-yamao-msft ,

     

    I tried your approach but i got below error when trying to create item with http send request method

     

    "message""An unexpected 'StartObject' node was found when reading from the JSON reader. A 'PrimitiveValue' node was expected.\r\nclientRequestId: f25778bf-37e5-4163-9a9c-1d4b99af9fe5\r\nserviceRequestId: a935439f-2006-0000-562b-82fcdcdfb505",
     
    Body :
    {
    '__metadata': { 'type': 'SP.Data.ListBListItem' },
    "Title": "Title",
    MultiUserId:{'results':[{"d":{"__metadata":{"id":"https://XXXXXXXXXXXXXXX.sharepoint.com/sites/XXXXTest/_api/Web/GetUserById(14)","uri":"https://XXXXXXXXXXXXXXX.sharepoint.com/sites/XXXXTest/_api/Web/GetUserById(14)","type":"SP.User"},"Alerts":{"__deferred":{"uri":"https://XXXXXXXXXXXXXXX.sharepoint.com/sites/XXXXTest/_api/Web/GetUserById(14)/Alerts"}},"Groups":{"__deferred":{"uri":"https://XXXXXXXXXXXXXXX.sharepoint.com/sites/XXXXTest/_api/Web/GetUserById(14)/Groups"}},"Id":14,"IsHiddenInUI":false,"LoginName":"i:0#.f|membership|User1@ABCD.com","Title":"User1 (Contractor)","PrincipalType":1,"Email":"User1@ABCD.com","Expiration":"","IsEmailAuthenticationGuestUser":false,"IsShareByEmailGuestUser":false,"IsSiteAdmin":true,"UserId":{"__metadata":{"type":"SP.UserIdInfo"},"NameId":"10030000ab6718f1","NameIdIssuer":"urn:federation:microsoftonline"},"UserPrincipalName":"User1@ABCD.com"}},{"d":{"__metadata":{"id":"https://XXXXXXXXXXXXXXX.sharepoint.com/sites/XXXXTest/_api/Web/GetUserById(299)","uri":"https://XXXXXXXXXXXXXXX.sharepoint.com/sites/XXXXTest/_api/Web/GetUserById(299)","type":"SP.User"},"Alerts":{"__deferred":{"uri":"https://XXXXXXXXXXXXXXX.sharepoint.com/sites/XXXXTest/_api/Web/GetUserById(299)/Alerts"}},"Groups":{"__deferred":{"uri":"https://XXXXXXXXXXXXXXX.sharepoint.com/sites/XXXXTest/_api/Web/GetUserById(299)/Groups"}},"Id":299,"IsHiddenInUI":false,"LoginName":"i:0#.f|membership|User2@ABCD.com","Title":"User2 (Supplier)","PrincipalType":1,"Email":"User2@ABCD.com","Expiration":"","IsEmailAuthenticationGuestUser":false,"IsShareByEmailGuestUser":false,"IsSiteAdmin":false,"UserId":{"__metadata":{"type":"SP.UserIdInfo"},"NameId":"1003bffda5c4d533","NameIdIssuer":"urn:federation:microsoftonline"},"UserPrincipalName":"User2@ABCD.com"}}]}
    }
     
    Thanks
    Sith
  • avsmillar Profile Picture
    14 on at

    I have been struggling with using this solution for my flow for two days.  I am stumped.  I have a list "Active" that has two multi-person columns.  When the "status" list item column is changed to "completed", I want to migrate the item to an "Archive" list.  I have used the standard to create a list item from another list item and then the delete list item function to remove it from the "Active" list.  However, when creating a list item from any existing list item where there are multiple people in a "Person or group" column, it creates a separate list item for every person.  I just want the exact same list item with all people in the one "person or group" column.  Can anyone help?  I have added an image of the entire flow and then another of just the "create" action.Archive flow.pngCreate item flow.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 459

#3
11manish Profile Picture

11manish 382

Last 30 days Overall leaderboard