cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Password Protected Screen

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,

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

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.

View solution in original post

4 REPLIES 4
Super User III
Super User III

@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:

 

PowerApps-User-Roles-Demo (1).gif

 

 

---
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,

 

@Haarold 

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."

Super User II
Super User II

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.

View solution in original post

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 (4,553)