cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Login to Help Desk as Admin 2020

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 🙂

2020-12-01 (3).png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

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!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

2 REPLIES 2
Super User II
Super User II

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!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

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!

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (7,945)