cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Check if an email is in an email group

I have a group email on Outlook that can use an application I'm working on. Only a subset of people in the office can access the application. I basically want to check in the OnStart property of the app if the user's email is in the group or not. 

 

I know there's an Office365Group function and you can find an email using User().Email. I just want to simply check if User().Email is in the group email I created in Outlook. 

 

How do I check this specific email in this specific group?

 

Thanks!

5 REPLIES 5
Merlijn
Level 8

Re: Check if an email is in an email group

Can you get access to the email addresses in this group? Or is that part of your question?

 

When you have access to these email addresses, and you van ClearCollect them in a local collection OnStart, you can check it with:

 

If(IsBlank(Lookup(EmailAddressCollection; Email = User().Email));"Formula when is NOT found"; "Formula when IS found") 

Anonymous
Not applicable

Re: Check if an email is in an email group

@Merlijn thank you for your help! It looks like your solution would work well. One question:

 

I have access and created the email group myself, but do I need a data connection to the group on PowerApps. After researching ClearCollect, I found this to be as close as I can get: 

ClearCollect(downtimeGroup,Office365Group.ListGroupMembers('ID'))

However, I feel I am missing some steps, such as the connection to the group email in PowerApps and the ID it is searching. 

 

Any bits I am leaving out would be appreciated, as I can't figure it out at the moment.

 

 

Merlijn
Level 8

Re: Check if an email is in an email group

Hm. I'm thinking of another solution for your problem.

 

If you're Office365 admin, you can enter the admincentre. If you create a Security Group, you can add members to it.

Share your app's with the usergroup, instead of single users, and you can maintain access to the app with adding or removing members.

 

group.pnggroup2.png

 

 

Is this maybe an easier, and more maintainable solution for the problem you're experiencing?

Merlijn
Level 8

Re: Check if an email is in an email group

You can check this out how to get the Group ID. https://www.sharepointeurope.com/id-office-365-group/

Anonymous
Not applicable

Re: Check if an email is in an email group

Thanks for the other possible solution, but I am not an office admin for Office365. It seems ti would be easier for me to try a figure out connecting the email group to my application, and figuring out the ID section. 

 

I'll read the article you linked me as well. 

 

I just need figure out how to write a ClearCollect for my group email.

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (5,982)