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

Remove user from SharePoint group when item is deleted from list

Hi everyone,

following situation:
I have a SharePoint List with everyone involved in the project (e.g. responsible topic, department, etc.) Everybody in this list needs to have access to SharePoint libraries where the access is handled with SharePoint Groups. What I figured out so far is how to add somebody to a group when I add someone to my project participant list (create item) using HTTP request. Now I want to remove somebody from the group when I delete this person from my project participant list. I figured out the HTTP request, that’s not my problem. My problem is that I can’t retrieve the data from the deleted element I need (LoginName). With the trigger when item is created or edited I can get the data “Column name Claims”. Unfortunately I can’t get this from the Trigger when item is deleted.

Can somebody help with that?

Thanks in advance

Here a few screenshots:

When person is removed from list(my problem):

Sid2804_1-1637054734475.png

 

When person is added to List(working perfectly fine):

Sid2804_0-1637054525207.png

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
AnthonyAmador
Community Support
Community Support

Hi @Sid2804 

 

The "When an item is deleted" trigger does not allow you to retrieve the column values of the item, if you want this feature to be added in future versions, submit your idea here. 

Power Automate Ideas - Power Platform Community (microsoft.com)

 

A workaround for this could be add a column called "Delete", this column can be Yes/No and the first value always no, then if you would like to delete the item, you can change it to yes, get the columns values first and then remove it, you can use the "when an item is modified" trigger and a trigger condition set only for that column. 

 

Hope this helps. 

Kind regards. 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

Thanks @AnthonyAmador,

I did find another workaround.

In my List I do not use the "Title" column but this is the only column also available in the deleted Item. In my flow to add a user I already update the created item with data from the person added (e.g. email and department). In the same step I update the "Title" column with the data needed to remove the user from the group.

It's working perfectly fine 🙂

View solution in original post

3 REPLIES 3
AnthonyAmador
Community Support
Community Support

Hi @Sid2804 

 

The "When an item is deleted" trigger does not allow you to retrieve the column values of the item, if you want this feature to be added in future versions, submit your idea here. 

Power Automate Ideas - Power Platform Community (microsoft.com)

 

A workaround for this could be add a column called "Delete", this column can be Yes/No and the first value always no, then if you would like to delete the item, you can change it to yes, get the columns values first and then remove it, you can use the "when an item is modified" trigger and a trigger condition set only for that column. 

 

Hope this helps. 

Kind regards. 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks @AnthonyAmador,

I did find another workaround.

In my List I do not use the "Title" column but this is the only column also available in the deleted Item. In my flow to add a user I already update the created item with data from the person added (e.g. email and department). In the same step I update the "Title" column with the data needed to remove the user from the group.

It's working perfectly fine 🙂

Glad to know you found a way. 

Please mark the thread as solved to help other users find it more quickly. 

 

Cheers. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (2,210)