Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Clearcollect(adminlist) question

I'm trying to run my first PowerApp using the helpdesk template that is in PowerApps. I've pretty much got everything where I want, however I'm having an issue with the Login as admin button. 


As i've seen on a couple other posts here the ClearCollect(AdminList) in the "ondemand" section of the app screen is where this is defined. I have defined 2 users in this list, using the same format in the other posts and the instructions that Microsoft has posted, (user's email address), however i still can't get logged in as admin no matter what I try. 


I also saw it posted that if i put a label on any page and give it the formula myprofile.mail that would display the format i should be using for this, however when i create a new label and set the text to myprofile.mail and play the app, nothing is displayed. 


Does anyone have any tips for a first timer like me on this? I've uploaded a few pictures to help explain it better. 

Dual Super User
Dual Super User

Re: Clearcollect(adminlist) question

Hi @koechsle , 


Kindly use User().Email instead of myprofile.mail and this will solve the issue. 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Community Support Team
Community Support Team

Re: Clearcollect(adminlist) question

Hi @koechsle ,

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:5.JPG



Please check if you have typed/specified your email address within the AdminList collection in OnStart property of App control.


If you have already typed/specified your email address within the AdminList collection in OnStart property of App control, please consider modify the formula within the OnSelect property of the "Login as a Help Desk Admin" button to following:

If(Lower(MyProfile.Mail) in Lower(AdminList.Value), Set(isAdmin,true),Set(isAdmin,false));  /* <-- Modify formula here */

then you need to save your app, and re-load it, check if the issue is solved.

Note: If you modify the AdminList collection within the OnStart property of App control, you need to re-fire the OnStart property of your app, otherwise, the modification would not take effect. You could consider click the "Run OnStart" property to re-fire the OnStart property of your app:8.JPG


Please take a try with above solution, check if the issue is solved.


Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Powered On

Re: Clearcollect(adminlist) question


This allowed the text box to show the currently logged in user, but even copy/pasting that to the adminlist didn't fix the issue. 

Level: Powered On

Re: Clearcollect(adminlist) question

I've tried your solutions, but i'm still getting the same error message, and not allowed to log in to the app as an admin. 


ClearCollect(TaskCategories,"LAPTOP / PC equipment issue","LAPTOP / PC software issue");
Set(MyProfile, Office365Users.MyProfile());
ClearCollect(AdminList,"myemailaddress", "another user's email");


I've tried to copy the settings in screenshots for @v-xida-msft 's solutions, but was still unable to fix th issue. Do you have any other words of wisdom?

Helpful resources

New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,679)