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

Canvas App - Access/ View User Permissions

Hi,

I've created a Power App for use by 6 people and I want them to have different permissions to view/ edit in the application. How can these restrictions be done?

 

The idea is to have different page/ screen permissions to different people.

 

@WarrenBelz | @Drrickryp | @timl | @BCBuizer | @RandyHayes 

 

 

5 REPLIES 5
jcfDaniel
Super User
Super User

Hi,

 

What is your datasource?

 

Regards


Regards. JD.
Mike2500
Super User
Super User

There are two concerns: data and app functionality. If your data source is SharePoint, then users will need access to the sharepoint lists, which complicates security concerns, as even if you make things read-only in the app, they may still have read-write if they go to the list itself. So if your security concerns are re data, then either use a data source like dataverse OR you'll need to deal with SharePoint permissions.

 

If your concerns are about making certain screens or buttons, etc., available to certain users, following is the old trick on setting up role level permissions:

 

1. Create a SharePoint list that has two columns, Title and Value (names here don't matter). Add a row to this list for each role you want beyond regular users. So if you want admins and finance users, create two rows. The rows will have titles of "admin" and "finance", and both will have a Value of 1. Then, using SharePoint permissions, change the permissions of the items so that your desired users have read access to these items. To be clear, regular users will have access to the list, but no items. A finance users would have read access to the finance item, but not the admin item, etc.

 

2. In the app start of the app, add code such as: 

 

Set(isFinance,If(LookUp(MyRoleBasedSecurityList,Title="Finance",Value)=1,true,false))

 

 

This means that a user accesses the app, it queries the list, and if they have access to the finance item, isFinance will be true, otherwise it will be false. You can then use this variable to control the visibility or enabled properties of buttons, etc. 

 

If you're using a model driven app, then please disregard. 

 

 

Hi, it is sharepoint

Thanks, let me try this out if this works

Thanks, let me try this out if this works

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,867)