web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Password Protected Screen
Power Apps
Answered

Password Protected Screen

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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,

 

 

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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,

     

  • mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 

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

  • Verified answer
    GarethPrisk Profile Picture
    2,828 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard