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 / Username and Password ...
Power Apps
Answered

Username and Password Protect Screen in PowerApps

(0) ShareShare
ReportReport
Posted on by 11

I am trying to protect entrance to a screen by requiring a username and password that is kept in a sharepoint list.  I have tried many different iteration yet still no dice.  Can anyone help me with this?  I have been going at this for two whole days...  This is my code:  If(LookUp(access_account, username=username.Text,password=inputpassword.Text, Set(errorMessage, ""); Navigate(Screen2, ScreenTransition.Fade), Set(errorMessage, "Wrong account name or password"))

Subit Code.png
Categories:
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Try something like this:

     

    If(
     IsBlank(
     LookUp(
     access_account,
     username = inputUsername.Text && password = inputPassword.Text
     )
     ),
     Set(errorMessage, "Wrong account name or password"),
     Set(errorMessage,""); Navigate(Screen2, ScreenTransition.Fade)
    )
  • pabent Profile Picture
    11 on at

    Still no dice...I am at wits end.  It makes no sense. 😞

    Submit Code_2.png
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Is UserName the name of your field in your SharePoint list and what type of column is UserName in the SharePoint list?

  • pabent Profile Picture
    11 on at

    Does this help?  btw Thank You for your help on this Saturday evening 🙂

    SP_Screen_1.png
  • pabent Profile Picture
    11 on at

    Does this help?  btw Thank You for your help on this Saturday evening 🙂

    SP_Screen_1.png
    SP_Screen_1.png
  • Verified answer
    Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Can you go into the list settings and click on username then look at the end of the URL and see what is listed after "Field=".

    This is will be the internal field name that PowerApps is ex[ecting and it is case sensitive.

  • pabent Profile Picture
    11 on at

    Son of a gun!  THANK YOU, THANK YOU, THANK YOU!!!!  Why on gods green earth do they change the field name????  So wierd.  Thanks again John.  KUDOS!

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 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard