With reference to the following :
https://powerusers.microsoft.com/t5/Building-Power-Apps/Prevent-people-from-accessing-SharePoint-list-that-the-PowerApp/td-p/156033/highlight/true/page/2
https://powerusers.microsoft.com/t5/Building-Power-Apps/Powerapps-and-Sharepoint-Online-Permissions/td-p/138367/page/2
Am trying to restrict users from accessing the Sharepoint list using web browser, but still be able to work with Powerapps where the list acts as a datasource.
To summarize :
1) Modify the 'Read' permissions level for the site.
Cog - Site Permissions
Advanced Permission settings
Ribbon - Permission levels
Read
Uncheck EVERYTHING except...
a) SITE PERMISSIONS: "Open - Allows users to open a Web site, list, or folder in order to access items inside that container."
NOTE: If performing this on a subsite, the Read permisison level also requires:
SITE PERMISSIONS: Browse User Information
SITE PERMISSIONS: Use Remote Interfaces
If you're applying this to a subsite, you may need to go to the parent site's Permission levels and add a new "Read" permission level (like SubSiteNameRead) that will be used on the subsite. Then once added, go to the subsite advanced Permissions and change the permission level for say "SubsiteName Visitors" from Read to SubSiteNameRead.
* this means any group or person with read access won't have access to anything (site, pages, libraries, lists ... everything)
2) Modify the 'Contribute' permissions level for the site.
Cog - Site Permissions
Advanced Permission settings
Ribbon - Permission levels
Contribute
Uncheck EVERYTHING except...
a) LIST PERMISSIONS: "View Items - View items in lists and documents in document libraries."
b) LIST PERMISSIONS: "Edit Items - Edit items in lists, edit documents in document libraries, and customize Web Part Pages in document libraries."
c) LIST PERMISSIONS: "Add Items - Add items to lists and add documents to document libraries."
* if users need to open attachments from list items, then the "Open Items" checkbox needs to be checked also
d) SITE PERMISSIONS: "Open - Allows users to open a Web site, list, or folder in order to access items inside that container." (might have automatically been selected from the list selections)
e) SITE PERMISSIONS: "View Pages - View pages in a Web site." (might have automatically been selected from the list selections)
If you're applying this to a subsite, you may need to go to the parent site's Permission levels and add a new "Contribute" permission level (like SubSiteNameContribute) that will be used on the subsite.
* sets the Contribute permission level so that it allows reading/adding/editing list items
3) Stop inheriting permissions on the lists used by the PowerApp
Go to list/s
Cog - List Settings
Permissions for this list
Ribbon - Stop Inheriting Permissions - OK
* so we can set special permissions for the lists used by the PowerApp
4) For the concerned lists change the Visitors user group access from Read to Contribute access.
Go to list/s
Cog - List Settings
Permissions for this list
SiteName Visitors - check the checkbox
Ribbon - Edit User Permissions
Uncheck Read (or SubSiteName Read)
Check Contribute (or SubSiteName Contribute)
* sets up the Visitors user group to be the group we put the PowerApp users in. This group now has special access to the required list/s, but still only has read access to the rest of the site.
5) Add the PowerApp users to the 'Site Visitors' group
Cog - Site Permissions
Advanced Permission settings
SiteName Visitors
Add people / group
--------------------------------
I have implemented solution described, removed all default users from 'Members' group (which incuded Everyone...). Only users who have access now are myself (Owner), and a test account, assigned to the visitor group with 'Contribute' permission to the list as outlined above.
Updated default read group
Permissions for default Read group
List permissions in custom contribute permission level
List permissions for the custom "Contribute" group
Site permissions in custom contribute permission level
Site permissions for the custom "Contribute" group. Only change I did was add 'User Remote Interfaces' and 'Browse User Information' as the settings proposed were not working. However, still could not access the data (I assume), gallery would only display "Getting your data". If I run the app using my own account (with Owner rights to the list), the gallery displays correctly.
The list itself consists of number/calculated columns. What am I doing wrong? Please advise.