Add user to a SharePoint group when SharePoint list item is created or modified using Microsoft flow/power automate

In this blog, we will know how to add a user to SharePoint group when item is created or modified using power automate or Microsoft flow. We need to follow below steps to add user to SharePoint group.


Step 1:

I have created a custom list having a user field. When I will update a item with user value that particular user will be added to our group.

Img1. This is my custom list. Here Completed By is my person/group field.


Now we need to create our Microsoft flow. Log in to Microsoft office 365 portal. From app launcher menu click on flow to create Microsoft flow.

Img2. Created instant cloud flow



Step 3:

Now we need to trigger action. I have selected when item is created or modified.

Img3. Skiped limited trigger action and choose when an item is created or modified menu in advance option


Step 4: Give site address and list name on the address bar add click on next step.

Img4. Updated site and list details.

Step 5: Now choose action.  We need to choose send http request to sharepoint.

Img5. Choose action

Step 6: update site address,method,uri and header value. Here we will add “Post” method as we will write user to group. My Uri value is “_api/web/sitegroups(4)/users”. Here 4 is my group id.

Img6. This is the group where we will add user

Add header and and content as given below

accept  application/json;odata=verbose

content-type application/json;odata=verbose


Img7: update action menu

Update body address bar with {“__metadata”:{“type”:”SP.User”},”LoginName”:”CompletedByclaims”}.just dynamically choose CompletedByclaims.

Img8: action menu body address bar update

Step 7: Save the flow with proper name. Now we need to add an item in our list.

Img9. Added item in custom list.

Step 8:

Now go to “My flows” to check whether flow is success or not. Refresh the browser in few second it will shows build status.

Img10. Flow runs succeed

Step 9: Now to go to sharepoint group, to check result User is added to group successfully.


Add user to Sharepoint Group using Microsoft flow

Add user to SP Group using Power Automate

Add user to SP Group when a new item to Sharepoint custom list using send http request to sharepoint action .

Add user to sharepoint group when item is modified in sharepoint list using send http request to sharepoint action .

Add user to a sharepoint group when sharepoint list item is created or modified using microsoft flow/power automate.


Add Your Comments

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