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 / In power app check use...
Power Apps
Answered

In power app check users credential authentication to login on Select the button

(0) ShareShare
ReportReport
Posted on by 12

In power app i have two login button “Admin” and    “User  “  . all user have 0365 account once they login in O365 account i have one app developed by SharePoint and power app. In Admin login i want to login only for selected Admins but in user all can login.

how to prevent Admin login by look up user role list from SharePoint those who are not in Admin user Role list?

Categories:
  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    If you want to implement this, there is a workaround - you can create a sharepoint list with one item in it, and the item-level permissions are set that only Admin role can view, everyone else has no access.

    Then inside your app you can check if CountRows(AdminListName) > 0, if yes then the person is an admin role, otherwise they are a user - you can then use this logic to define if the currently logged in user is an admin or not.

  • Berihun1 Profile Picture
    12 on at

    f(TextInput2.Text exactin Home_Screen.UserName And LookUp('Users Role','UserName'.Password=TextInput2.Text.Password=TextInput3.Text,Notify("Login Sucessfull",NotificationType.Success,2000),Notify("Invalid Credentials",NotificationType.Error,2000)),
    Navigate(Admin_Screen)

     

    i have used the above code on login but still not working incompatible type of comparison  warning error

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

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard