Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Remove user from a SharePoint group with Power Automate flow

Posted on December 4, 2022December 4, 2022 by Tom

“My organisation still uses SharePoint groups to manage permissions, can I automatically remove user from a group with Power Automate flow?”


If you’re working with SharePoint groups, Power Automate won’t give you much help. All the actions expect that you’ll use M365 groups, that the SharePoint groups are a thing of the past. But it’s not that easy to change the whole SharePoint concept to fit such expectation. You’ve been using SP groups for some time and you’ll keep doing so. The only question is… how?

You’ll need HTTP request

If there’s no dedicated action, you need an HTTP request. It was already explained in the previous articles on adding permissions to a SharePoint group and adding user to a SharePoint group, but that was only addition. Now it’s time to do also the opposite – remove users from a group.

To remove user from a group you’ll need two pieces of information – the SharePoint group id (from the first linked article), and the user id. Once you have both the ids, you can add them into an HTTP request sent to SharePoint.

Method: POST

Uri:
_api/web/siteGroups/getById(<groupId>)/users/getById(<userId>)

Header:
{
    "X-HTTP-Method": "DELETE"
}
Power Automate remove user SharePoint group

And that’s it, that’s one less user in the SharePoint group.

Summary

Every Power Automate automation involving SharePoint group must be done via HTTP request, no matter if you want to add, list or remove user(s). In this case it’ll be a combination of three HTTP requests. Firstly, get the SharePoint group id using the group name. Secondly, get the user id using his email. Once you have this information put the final HTTP request together and send it to the SharePoint.


πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

3 thoughts on “Remove user from a SharePoint group with Power Automate flow”

  1. Everart Araujo says:
    April 5, 2024 at 9:34 am

    How to get all groups from a user and remove the user from all groups?

    Reply
    1. Tom says:
      April 17, 2024 at 10:28 pm

      Hello Everart,
      I guess you’d have to list all groups everywhere and all members of these groups to find the user. I don’t think you can easily get a list of all groups per user, that’s why it’s better to use M365 groups instead of SP groups.

      Reply
  2. Roeland says:
    May 10, 2024 at 1:56 pm

    This removes my whole group, not the specified user! πŸ™
    Can you tell me what’s happening, cause I’ve tried this but it’s not working, only deleting my whole SP Group

    Reply

Leave a Reply Cancel reply

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

πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Working on an Approval process?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy a fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes