Power Apps- Blocking SharePoint List Access

One of the most common issues when we develop a Power App that is connected to a SharePoint list is blocking the default interface of the SharePoint site so that the users are “forced” to use the Power App instead updating the list directly and thus bypassing the Power App, if our Power App updates or creates new elements on the list we are forced to give the users at least collaboration access to update the lists, if we give then only read only access the wouldn’t be able to update the list, therefore what we can do instead is create a custom permission level for the app users.

Let’s start with a basic power app:

This app allows the user to insert or edit an element on the list “Travel Request” which is a list based on the Travel Request template of SharePoint Online.

Now, normally we give the Power App users contribute access to the site, but that would also allow them to modify the contents of the list directly, what we need to do is create a custom permission level that will allow users to modify the content programmatically (REST API/CSOM/JSOM) but also block access to the Site Contents page and edit forms of the site.

Custom Permission Level

Let´s start creating the custom permission level

First, we need to access the Site Settings, you can access this options from the Site Contents Page.

Now under Users and Permissions select Site Permissions.

Site permissions

On the ribbon select Permission Levels.

Permission Levels

Now, we are going to select the contribute permission level.

Contribute

Scroll to the bottom of the page and click the Copy Permission Level button.

Copy permission level

This will copy all the configuration of the Contribute permission level to a new custom permission level. Let's name the new permission level Power Apps and insert a more meaningful description.

Before finishing the creation of this new permission level Uncheck the permission View Application Pages under the category List Permissions.

With this configuration users will be unable to access the Site Contents Page or the view forms or edit forms from the SharePoint Site.

Finally click the Create Button.

Configure Group Permissions

Now we just need to create a new group and assign our new permission level, for this we just need to follow these steps:

1- Go to Site Settings
2- Go to Site Permissions
3- Select Create Group
4- Name new group as "Power App Users"
5- On the new group settings select new permission we created earlier (Power Apps)
6- Click create

Now our group is ready, and we can add our Power App users which will allow them to update or insert elements using the power app but block them from accessing Site Contents or Edit Forms of the SharePoint site.

Important Note:

If any of your power app users are also members of other groups like Administrators, Contributors, Members, Visitors, Etc... this will override the previous configuration and these users will have access to the SharePoint List.

Sé productivo. Sé extraordinario. Sé INAVANT.