cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JimmyWork
Power Participant
Power Participant

Add user to Group (Check if user already exists in group)

Hi 

 

Is it possible to check if a user is already added to a group before trying to add him/her?

Im doing a Add user to Group - Azure and it will fail if the user is already in the group.

Im adding users from a SharePoint Person column. And if thye user is already in the group the flow will fail.

2 ACCEPTED SOLUTIONS

Accepted Solutions

 

Hi @JimmyWork ,

 

Sorry, I understand what you mean wrong.

In addition, you can also try this method below.

42.PNG

 

Best Regards,

Community Support Team _ Barry
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

 

Hi @JimmyWork ,

 

This is the expected result because the result of the Condition is false, so Add member to group action will not be executed. Then your problem will be solved.

 

Best Regards,

Community Support Team _ Barry
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

9 REPLIES 9
Harry_G
Kudo Kingpin
Kudo Kingpin

Hi @JimmyWork ,

Can you tried List group Members Action? If not please try.

After getting group members you can apply loop for check each member's email. if user is not exist you can add it.

sample flow for help

1.JPG2.JPG

Thanks,

Harry_G

v-bacao-msft
Community Support
Community Support

 

Hi @JimmyWork ,

 

You only need to get the email of the specified user, and then configure Add member to group action.

If the current user is already a member of the specified group, the action will show that the execution failed.

36.PNG

37.PNG

 

Best Regards,

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

@v-bacao-msft Well i don't want the flow to say failed each time a user adds themself by mistake. If i get multiple emails saying my flow keeps on failing thats just not so good for me.

 

@Harry_G I will check this out today, thank you for helping out.

 

Hi @JimmyWork ,

 

Sorry, I understand what you mean wrong.

In addition, you can also try this method below.

42.PNG

 

Best Regards,

Community Support Team _ Barry
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

@v-bacao-msft 

I tested your solution and it seems to work but i get a ActionBranchingConditionNotSatisfied but it still adds the correct users.

 

2019-09-27 14_09_53-Run History _ Microsoft Flow.png

 

Hi @JimmyWork ,

 

This is the expected result because the result of the Condition is false, so Add member to group action will not be executed. Then your problem will be solved.

 

Best Regards,

Community Support Team _ Barry
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

@v-bacao-msft I cant get this to work.

 

2019-10-20 14_59_05-Run History _ Microsoft Flow.png2019-10-20 15_00_31-Edit your flow _ Microsoft Flow.png

@Harry_G I cant get this work, it works correctly if i do compose but as soon as i add, add to group i get error. It will add the user to the group but the conditions will gave error for some reason?

 

2019-10-20 15_17_36-Run History _ Microsoft Flow.png2019-10-20 15_18_09-Edit your flow _ Microsoft Flow.png2019-10-20 15_20_00-Run History _ Microsoft Flow.png

Anonymous
Not applicable

This is great @v-bacao-msft This method works a treat! May be worth adding this to a blog post for more visibilty. It's very useful for business processes we are implementing. 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (3,066)