Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Answered

Use Flow to Remove User from Permissions Group

(1) ShareShare
ReportReport
Posted on by 164

Hi. I am relatively new to using REST operations, and I am at a loss as to how to remove a user from a SharePoint permissions group by using the Flow action "Send an HTTP Request to SharePoint."

 

I have a list of users--who are already provisioned in our SharePoint Online collection--that will be updated monthly with names of those requiring access and those leaving the department.

 

The list already exists, and I have been able to handle ADDING new users to the necessary groups; but I can't figure out how to (or even whether I can) remove users. Everything I've tried so far has ended with a "Missing required query string: @target..." error, or a more-basic JSON formatting error.

 

Here is my untrained attempt at configuring the REST action from Flow:

11-26-2018 12-09-34 PM.png

 

Help, please!!

(Thanks!)

Categories:
  • gtanaka Profile Picture
    14 on at
    Re: Use Flow to Remove User from Permissions Group

    Hi!

    Thankfully for your question I could resolve this issue that I've been days trying to get a resolution.

     

    I just wanna contribute to other users, since I had difficulties to find the groupId:

    gtanaka_0-1700138587233.png


    The Flow action "Send an HTTP Request to SharePoint." was set as you see bellow:

     

    gtanaka_1-1700138898564.png

     

  • teylyn1 Profile Picture
    358 on at
    Re: Use Flow to Remove User from Permissions Group

    Yes. Start a new question with that, because nobody will pay attention to a follow-up question buried deep into another user's discussion comments.

     

  • IAmIntractable Profile Picture
    270 on at
    Re: Use Flow to Remove User from Permissions Group

    I am looking for HTTP information that will allow me to completely remove a user from a site collection. I do not want to iterate through permission groups as this leaves the user in Permission Group 0 which is the collection level group. I want the user totally removed from a site collection. Any suggestions?

  • MM-05080756-0 Profile Picture
    410 on at
    Re: Use Flow to Remove User from Permissions Group

    Hi, sorry I wasn't available to assist you during summer, but nice to hear that you got it working in the end 🙂

  • Nand_Basto Profile Picture
    64 on at
    Re: Use Flow to Remove User from Permissions Group

    RemoveUserById worked for me as well, finally!
    Thank you for sharing the page of 'Norm Young'

  • Nand_Basto Profile Picture
    64 on at
    Re: Use Flow to Remove User from Permissions Group

    mee too, same error.
    i posted a question about it too.

    did you find a solution to this?

  • Nand_Basto Profile Picture
    64 on at
    Re: Use Flow to Remove User from Permissions Group

    @mboonie , I am still getting the error: 
    {"odata.error":{"code":"-2130575276, Microsoft.SharePoint.SPException","message":{"lang":"en-US","value":"The user does not exist or is not unique."}}}

    • I can assure you that the user is there in the group mentioned i.e. (43)
    • Still, I get this error, tried with other groups and users, and still the same error.
    • Please look at my flow (attached), it's a simple Instant-flow, I don't understand, what is wrong!

    Screenshot of my simple instant flow to remove userScreenshot of my simple instant flow to remove user

     

  • MM-05080756-0 Profile Picture
    410 on at
    Re: Use Flow to Remove User from Permissions Group

    Hi, oh, this is a long time ago, didn't remember what Flow I was working on, but now I found it 🙂

    I do not know how I made it work, though.

     

    The trigger is when an item is created or modified in the list of employees, and below is the set-up that works for me. However, the trigger is not used after the Get user action, so I suppose the trigger could be a recurrance, maual or anything. The only thing you need for that to work is to fetch the user-ID from Azure. I think 😄 

     

    dasfsdf.jpg

     

  • mnkuroda91 Profile Picture
    2 on at
    Re: Use Flow to Remove User from Permissions Group

    What is your trigger action if you don't mind me asking? I am trying to do the same thing and I'm a complete novice!

  • MM-05080756-0 Profile Picture
    410 on at
    Re: Use Flow to Remove User from Permissions Group

    @MrEdward , I got the same error and after a loooot of trial and error (and more error), and googling, I found this: Add and remove users to a SharePoint site using Microsoft Lists and Power Automate – Norm Young

    The "Remove user" part worked for me, finally. No other suggestions I've found (that apparantly have worked for others) worked for me.

     

    The Compose looks like this in my Flow

    @{body('Send_an_HTTP_request_to_SharePoint_GetUserId')['d']['id']}

     

    Namnlös.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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Featured topics