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
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,071)