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?
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")
@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:
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.
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.
Is this maybe an easier, and more maintainable solution for the problem you're experiencing?
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.
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round
Register by September 5 to save $200