cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kadd
Resolver III
Resolver III

Check if a user exists and remove it from SP group

Hello, 

 

hope you are all doing well.

 

I'm sure there is an answer somewhere, i found some, i tried them and it doesn't work, so i create a post.

 

I have a list with a column "Users" (people column activated for multiple users)

I created a flow that adds users to a selected SP group. this works perfectly.

I'm working for a company where there is a lot of turn over and since i created the flow 2 months ago, 2 people being part of a SP group left the company. so of course my flow adds new people but since it adds all the people from the list it detects that 2 people have left and the flow fails.

 

Does anyone know, prior to adding new users, how i can check if other people are still there and remove them ?

 

I created a condition where i set that "users email equals 0" that doesn't work, i used an action search users in office365 and did a condition on different values of this action...that doesn't work, i tried lots of variant of everyhting  i found and nothing works . that means i'm missing something but i don't know what...

 

Thanks for your help

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @Kadd,

 

Maybe you can use the Resolve Person action to achieve this:

https://docs.microsoft.com/en-us/connectors/sharepointonline/#resolve-person

 

Chakkaradeep has written a nice blog about the usage of this action: https://www.chakkaradeep.com/2018/03/14/validate-sharepoint-person-field-in-microsoft-flow/



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @Kadd,

 

Maybe you can use the Resolve Person action to achieve this:

https://docs.microsoft.com/en-us/connectors/sharepointonline/#resolve-person

 

Chakkaradeep has written a nice blog about the usage of this action: https://www.chakkaradeep.com/2018/03/14/validate-sharepoint-person-field-in-microsoft-flow/



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Hi @Expiscornovus ,

 

Thanks a lot for your answer.

 

Yes!! it works !!! 🙂 

 

thanks a lot for your help !!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,031)