Work with permissions in a lookup list from a SharePoint site
In this scenario article, you'll learn how to configure permissions for fields that use lookup columns from a list created using Microsoft Lists. When you create a canvas app that connects to SharePoint, the app follows permissions configured inside SharePoint. Unique permissions at different levels inside SharePoint can become confusing when surfacing lists, libraries, or items on a canvas app screen.
The example in this tutorial explains how you can work with a canvas app that connects to SharePoint with such broken inheritance.
- You must have created an app using a SharePoint connector that connects to a list.
- The list should consist of a lookup column with values from another column.
- You need two user accounts with access to the app and the SharePoint site hosting the lists.
- You need to be knowledgeable about how to configure lists and list/item permissions.
You can customize permissions for a list or list item when you stop inheriting permissions. Consider, for example, that you connect your app with a SharePoint site that has a broken inheritance at different levels. The app behavior might appear confusing if the user doesn't have access to the correct SharePoint objects as intended. Ensure the user can browse to the list and work with the objects with the same permissions that you expect the canvas app to surface.
Create two lists with one list consuming columns as lookups from the other list. In this tutorial, we'd use two lists:
List Columns Shapes - Title
- Color (lookup column)Colors - Title (for color of the shape) The Shapes list has a Color lookup column. This lookup column is connected to the Color column from the Colors list for values. You can also use your own lists instead.
If necessary, create sample items:
Shapes Color Circle Red Rectangle Blue Triangle Green The shape colors are through the lookup column from the Colors list.
Sign in to Power Apps.
Create a new app.
Save and publish the app.
Share the app with another user. For example, Kenny Smith.
Run the app as the user that you shared the app with (Kenny Smith in this example).
Since the SharePoint site, list or items aren't shared with the user, the app will show no available items.
Grant the user item-level permission to a list item.
Refresh the app as the user (Kenny Smith in this example).
The user, Kenny Smith, is unable to see the color since color is from a separate list and is looked up by the color column. There are no permission changes to the app from Power Apps.
Note
If the user can see the lookup column, check the permissions for the lookup column list. If the lookup column list has unique permissions and the user is added, you can skip the next step.
Go to Colors list permissions and add the other user (Kenny Smith in this example) explicitly.
Refresh the app as the user (Kenny Smith in this example).
As you can see, SharePoint permissions for lists and lookup lists directly cause the items to show (or not) depending on how permissions are configured.
- Formula reference for Power Apps
- Control reference for Power Apps