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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Restricting access to ...
Power Apps
Unanswered

Restricting access to button

(0) ShareShare
ReportReport
Posted on by 50

Hi PowerApps community

 

I have a question about restricting access to one of my buttons. 

 

Employees can access button "Formulier IDEWA" (see picture 1). There they can fill in a form that will be saved in button "Lijst IDEWA's". However I want to restrict access to button "Lijst IDEWA's" for employees so that only managers (people who are site owners on Sharepoint - see picture 2) can click on button "Lijst IDEWA's". 

 

How can this be done?

 

Picture 1

Bensen_0-1692950532227.png

 

Picture 2

Bensen_1-1692950907471.png

 

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    on at

    Hi @Bensen ,

     

    I would say it's better and easier that using a list to manage site owners including their Names and Emails, otherwise you will have to create a custom connector using Graph Api or trigger a flow to get owner members. Please check below thread:

    Solved: Get SharePoint Group Membership in App to use for ... - Power Platform Community (microsoft.com)

     

    With the help of an Owners list, you can use it as data source, checking logged in users and if their Email is in that list, enable or show that button, else disable or hide it from the screen.

     

    Best regards, 

     

  • JasonZF Profile Picture
    572 on at

    Create a two-item SharePoint list with just one column. Name one item Owners and the other Members. Set up access permissions for each item so that only members are able to see the Members item, and only owners can see the Owners item. Then do a LookUp(), or a filtered CountRows() on app start via the OnStart property to set the permissions of a variable. Then you can hid or disable controls all over the app based on this variable. This is how I do it in all of my apps, and it works great. To check for a visitor, do an unfiltered CountRows(). If the result is 0, you know the user is a site visitor.

    JasonWS_0-1692968270030.pngJasonWS_1-1692968289093.pngJasonWS_2-1692968309066.png

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard