question

D553 avatar image
0 Votes"
D553 asked D553 edited

Set SharePoint group to people picker column in powerautomate using RestApi

Actually while updating a user mail in people picker column. We use as the following:

"FieldValue":"[{'Key':'i:0#.f|membership|xxx@domain.com'}]"


In the same way I would like to know, how to update a Sharepoint group in people picker column from a SharePoint list using power automate using rest api.

Can anyone help me out of this?

not-supported
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AllenXu-MSFT avatar image
0 Votes"
AllenXu-MSFT answered D553 commented

Hi @DivyaGuggilam-2250 ,

To update a people field (single or multiple) in Power Automate, you can use Send an HTTP request to SharePoint REST API by setting field with user or group Id.

Considering the field name is Editor, the format for user field value:

Single-valued user field: 'EditorId' : 1

Multi-valued user field: 'EditorId' : { 'results': [1, 2, 3] }

Where 1, 2, 3 are ID of users/groups.

For example:
139831-image.png

  • Headers

     {
          "content-type": "application/json;odata=verbose",
          "IF-MATCH": "*",
          "X-HTTP-Method": "MERGE"
     }
    

  • Body

     {
         "__metadata": {
             "type":"SP.Data.PeopleFieldDemoListItem"
         },
        
         "EditorId": 17,
     }
    

For more details, please take a reference to the following articles:
How to update People field using ‘Send an HTTP request to SharePoint’ in Power Automate?
How to update the SharePoint People Picker Field using Power Automate
Update a people field in a SharePoint List using REST API using Power Automate

Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


image.png (85.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes thank you. But i would like to know in the below format as shown in the figure. Is there any option in that format format.
140295-img-20211013-155230.jpg


0 Votes 0 ·
D553 avatar image
0 Votes"
D553 answered D553 edited

Yeah, I got the solution from this reference link

https://www.linkedin.com/pulse/list-items-system-update-options-sharepoint-online-andrew-koltyakov

We have to use the following syntax:

"FieldValue":"[{'Key':'LoginName/GroupName'}]"

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.