cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Remove member of a sharepoint Team site group using "send http request to sharepoint"

Hi,

 

I am looking for a way to remove a member of a group inside of a sharepoint using "send http request to sharepoint".

I know how to add a member to that group using http request (if it can help others) :

 

flow_send_http_request_remove_member.png

 

I tried using delete Method with the same Uri and Body but it's not working.

 

Hope someone can help.

Thanks in advance,

Sriks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User II
Dual Super User II

Re: Remove member of a sharepoint Team site group using "send http request to sharepoint"

Here's what worked for me

screenshot.png

I'm using the ID's of the group and the user.  NOTE: This will remove the user from the group everywhere in the site collection.  There is no way to remove a user from a group for one permission assignment.  The group membership is stored at the site collection level.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Highlighted
Super User II
Super User II

Re: Remove member of a sharepoint Team site group using "send http request to sharepoint"

try post instead of get

try added this to your headers:

 

"X-HTTP-Method""DELETE" 

Highlighted
Frequent Visitor

Re: Remove member of a sharepoint Team site group using "send http request to sharepoint"

@Gristy 

Thanks for the help.

my new headers looks like that :

 

"headers": {
"accept": "application/json;odata=verbose",
"content-type": "application/json;odata=verbose",
"X-HTTP-Method": "DELETE"
}

 

Sadly, i got an error running the flow : 

"Microsoft.SharePoint.Client.InvalidClientQueryException"
Highlighted
Dual Super User II
Dual Super User II

Re: Remove member of a sharepoint Team site group using "send http request to sharepoint"

Here's what worked for me

screenshot.png

I'm using the ID's of the group and the user.  NOTE: This will remove the user from the group everywhere in the site collection.  There is no way to remove a user from a group for one permission assignment.  The group membership is stored at the site collection level.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted
Frequent Visitor

Re: Remove member of a sharepoint Team site group using "send http request to sharepoint"

@Pstork1 

Thanks a lot, it's working !

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (10,343)