Hello there,
Same old problem when trying to log in as Admin into the Help Desk app from Power Apps.
I have read all the suggestions so far, tried with different emails, tried to see if the email is correct, tried to use Lower:
If(Lower(MyProfile.Mail) in Lower(AdminList.Value)
When I highlight myProfile to see the intel, it shows a message "PowerApps encountered an intern... (which I believe be the problem).
Any other ideas?
Thanks very much 🙂
Solved! Go to Solution.
Hi,
Just a quick note on this - how are you storing the values for AdminList? Is it derived from User().Email?
Office365Users.MyProfile.Mail gets you the user's primary email smtp address
User().Email gets you the user's UserPrincipalName.
depending on the setup of your IT infrastructure these two may not be the same value.
If you really want to do debugging to confirm this yourself, have two labels, one with User().Email as its value and the other with MyProfile.Mail then a third label with AdminList.Value so that you can verify whether those values exist within it.
Additionally, wherever possible, if you must use MyProfile, then use MyProfileV2 as it's the more updated function call.
Cheers,
Sancho
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi,
Just a quick note on this - how are you storing the values for AdminList? Is it derived from User().Email?
Office365Users.MyProfile.Mail gets you the user's primary email smtp address
User().Email gets you the user's UserPrincipalName.
depending on the setup of your IT infrastructure these two may not be the same value.
If you really want to do debugging to confirm this yourself, have two labels, one with User().Email as its value and the other with MyProfile.Mail then a third label with AdminList.Value so that you can verify whether those values exist within it.
Additionally, wherever possible, if you must use MyProfile, then use MyProfileV2 as it's the more updated function call.
Cheers,
Sancho
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi @iAm_ManCat
Thank you very much for your tip, it really worked!
I have changed MyProfile.Mail for User().Email :
If(User().Email in AdminList.Value,Set(isAdmin,true),Set(isAdmin,false));
If(isAdmin,Navigate(MyTicketsScreen,None),Set(ShowAccessError,true))
Success!
Thanks very much!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
176 | |
62 | |
32 | |
30 |
User | Count |
---|---|
325 | |
268 | |
104 | |
74 | |
56 |