Hi,
I have a screen that is password protected but didn't account for something in my solution. So how do I store the password in the power app so when a user enters the correct password once during that session, they can click in and out of that protected screen without it asking for the password each time?
Thanks,
Solved! Go to Solution.
I agree with @mdevaney - this should in no way be considered a secure way of doing something.
However, you're asking for a basic blocking pattern.
Add a variable to your app OnStart
Set(
gblBlocker,
true
)
Then add a TextInput control to allow them to enter the phrase, when required. This can toggle the variable off. Use the Boolean variable to show/hide, or enable/disable functionality.
For example, put this in the OnChange property of the TextInput.
If(
Self.Text = "passPhrase" And gblBlocker,
Set(
gblBlocker,
false
)
)
Again, and I can't stress this enough - this is not secure/recommended for anything requires actual security, but I can appreciate that you may want to block functionality until a user does something.
@Haarold
Hello there! Actually, there is no need to create a password protected screen in Power Apps. All users must login to Power Apps with their valid Office 365 credentials making another login screen redundant.
What you should do instead is implement a 'role-based' user interface that changes based on who is using the app. If the screen should only appear to Managers then we can show/hide the next screen button based on who they are. To do this users would need to be stored in a table with their roles.
Here's an article I recently wrote on how to create a role-based user interface.
https://matthewdevaney.com/designing-a-role-based-user-interface-in-power-apps/
Example:
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hi,
Thanks for this. I don't think this would work as I have 12k+ users accessing the app. Having a table would be a mammoth job to manage.
Thanks,
I would say that, likewise, having a single password for 12k+ users is not secure at all... you should consider a different strategy.
Perhaps you can come up another method based on the user’s Azure AD or Office 365 profile information.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
I agree with @mdevaney - this should in no way be considered a secure way of doing something.
However, you're asking for a basic blocking pattern.
Add a variable to your app OnStart
Set(
gblBlocker,
true
)
Then add a TextInput control to allow them to enter the phrase, when required. This can toggle the variable off. Use the Boolean variable to show/hide, or enable/disable functionality.
For example, put this in the OnChange property of the TextInput.
If(
Self.Text = "passPhrase" And gblBlocker,
Set(
gblBlocker,
false
)
)
Again, and I can't stress this enough - this is not secure/recommended for anything requires actual security, but I can appreciate that you may want to block functionality until a user does something.
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 |
---|---|
200 | |
183 | |
76 | |
46 | |
37 |
User | Count |
---|---|
325 | |
258 | |
123 | |
72 | |
58 |