How to Remove a Group's Permissions from a SharePoint List with the REST API in Power Automate
Once a SharePoint list has its own permissions, a flow can take a group's access away with one REST request: a DELETE of the group's role assignment on the list. Reading the group's ID and checking the list first means the flow removes only what's there.
Syntax
All three requests go through Send an HTTP request to SharePoint (How to Use Send an HTTP Request to SharePoint), with the header Accept: application/json;odata=nometadata. A group's access to a list is a role assignment, found by the group's ID, its principal ID.
Read the group's ID
| Field | Value |
|---|---|
| Method | GET |
| Uri | _api/web/<group>?$select=Id,Title |
<group>:associatedmembergroup,associatedvisitorgrouporassociatedownergroupfor the site's own Members, Visitors or Owners group. Microsoft's Webs REST API reference lists them as the site's associated groups. For any other group, usesitegroups/getbyname('<group name>').
Check that the group has access
| Field | Value |
|---|---|
| Method | GET |
| Uri | _api/web/lists/getbytitle('<list name>')/roleassignments?$filter=PrincipalId eq <group ID>&$select=PrincipalId |
The answer's value array has one entry when the group has access to the list, and is empty when it hasn't.
Remove it
| Field | Value |
|---|---|
| Method | POST |
| Uri | _api/web/lists/getbytitle('<list name>')/roleassignments/getbyprincipalid(<group ID>) |
| Headers | X-HTTP-Method: DELETE, as well as Accept |
<list name>: the list's title, as in Site contents.<group ID>: theIdfrom the first request.
The request has no body. The X-HTTP-Method header turns the POST into a delete, as in Microsoft's Set custom permissions on a list by using the REST interface, which deletes a role assignment with getbyprincipalid the same way.
The Example
A list called Suggestions, on the root site contoso.sharepoint.com, already has its own permissions, copied from the site (How to Stop Inheriting Permissions on a SharePoint List with the REST API in Power Automate). The site's Members group, Communication site Members, should no longer see it. The flow, Remove a Group from a List, has five parts:
- Manually trigger a flow (How to Create an Instant Cloud Flow Inside a Solution in Power Automate).
- Get the Members group, the first GET.
- Find the group on the list, the second GET.
- If the group has access, a condition.
- Remove the group, the DELETE, in the condition's True branch.
Prerequisites
- Full Control of the site for the account the flow's SharePoint connection uses. Changing a list's permissions needs the Manage Permissions permission, which only Full Control includes by default.
- The list has its own permissions. A list that still inherits its site's permissions has to stop inheriting first.
Step 1: Read the Group's ID
Add Send an HTTP request to SharePoint and rename it Get the Members group:
| Field | Value |
|---|---|
| Site Address | Your site |
| Method | GET |
| Uri | _api/web/associatedmembergroup?$select=Id,Title |
| Headers | Accept: application/json;odata=nometadata |

Step 2: Check the List
Add Find the group on the list. Type the Uri up to eq , then add this expression where the group's ID goes (How to Add an Expression in Power Automate), and type the rest:
body('Get_the_Members_group')?['Id']
| Field | Value |
|---|---|
| Site Address | Your site |
| Method | GET |
| Uri | _api/web/lists/getbytitle('Suggestions')/roleassignments?$filter=PrincipalId eq Id &$select=PrincipalId |
| Headers | Accept: application/json;odata=nometadata |
The designer shows the expression as an Id token:

Then add a Condition called If the group has access (How to Add a Condition in Power Automate). On the left, add this expression; choose is equal to; on the right, add the expression false:
empty(body('Find_the_group_on_the_list')?['value'])
empty() is true when the value array has nothing in it, so the condition is true when the group does have access. In expressions, an action is named with underscores for its spaces.
Step 3: Remove the Group
In the True branch, add Remove the group, with the same Id expression inside getbyprincipalid( ):
| Field | Value |
|---|---|
| Site Address | Your site |
| Method | POST |
| Uri | _api/web/lists/getbytitle('Suggestions')/roleassignments/getbyprincipalid( Id ) |
| Headers | Accept: application/json;odata=nometadata |
X-HTTP-Method: DELETE |

Step 4: Run the Flow
Save the flow and test it manually (How to Test a Cloud Flow Manually in Power Automate). The group had access, so Remove the group ran:

The body of Get the Members group in the run shows the ID the other two requests used:

The Result
The list's permissions page, List settings > Permissions for this list, no longer lists Communication site Members. The Owners and Visitors groups are still there:

The group itself is untouched: it keeps its members and its access to the rest of the site.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
| Typing the group's ID by hand | The number belongs to one site's group | Read it from the site in the same flow |
Leaving out X-HTTP-Method: DELETE | Nothing in the request asks SharePoint to delete | Add the header |
| Removing from a list that still inherits | Microsoft's guide stops inheritance before adding or removing role assignments | Stop inheriting first |
| Removing the Owners group by mistake | The site's owners lose the access that group gave them to the list | Check the group's Title before you remove it |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| The condition is false | The group has no access to the list | Check the list's permissions page |
| An access-denied error | The connection's account can't manage permissions | Use an account with Full Control |
| The wrong group was removed | The first request read another group | Check its Title in the run |
FAQ
Does this take the group's members out of the group?
No. It removes the group's access to the one list. The group and its members stay as they are.
How do I remove a group that isn't one of the site's three?
Read its ID with _api/web/sitegroups/getbyname('<group name>')?$select=Id, and use that ID the same way.
Can I do this without a flow?
Yes, with Remove User Permissions on the list's permissions page: How to Remove a Group's Permissions from a SharePoint List.
Conclusion
Read the group's Id, check …/roleassignments?$filter=PrincipalId eq <group ID>, and when the group has access, POST to …/roleassignments/getbyprincipalid(<group ID>) with X-HTTP-Method: DELETE. The group loses access to that list and nothing else.
Additional Resources
- Set custom permissions on a list by using the REST interface
- Users, groups, and roles REST API reference:
RoleAssignmentCollectionandGetByPrincipalId. - Webs REST API reference: the site's associated groups.
