Skip to content

Commit 510a09c

Browse files
committed
New flow guidance documentation on managing list and file permissions
New flow guidance documentation on managing list and file permissions
1 parent dd3b445 commit 510a09c

10 files changed

+88
-8
lines changed

docs/business-apps/power-automate/guidance/manage-lis-item-file-permissions.md

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
title: Manage list item and file permissions with Power Automate
3+
ms.date: 07/16/2020
4+
---
5+
6+
# Manage list item and file permissions with Power Automate flows
7+
SharePoint connector in Power Automate provides the following actions to manage permissions of an individual list item in a list or a file in a document library.
8+
- Grant access to an item or a folder
9+
- Create sharing link for a file or folder
10+
- Stop sharing an item or a file
11+
12+
All of the above actions let you customize permissions for the item or a file to allow the right users to access that item or the file. To grant access or stop sharing, you will need to be a list owner of that list or library. That means, in your flow for these actions, you must connect to the list or library using a list owner user account.
13+
14+
## Grant access to an item or a folder
15+
The 'Grant access to an item or a folder' action requires the following inputs:
16+
- SharePoint site address
17+
- List or library name or identifier
18+
- The item or the file identifier for which to grant access
19+
- The recipients to whom you want to grant access
20+
- The permission role you want to grant
21+
22+
![Grant access to an item or a folder](../../../images/grant-access-item-file-action-flow.png)
23+
24+
In the flow action, you can also include a message and choose to notify the recipients once they get access to the item or the file.
25+
26+
> [!NOTE]
27+
> 'Grant access to an item or a folder' does not support granting access to external users.
28+
29+
### Choosing a permission role to grant access
30+
Depending on the user, you may want to grant them either access to edit or read. You can choose the right access in the Roles property.
31+
32+
![Choose the right role to grant access to an item or a file](../../../images/grant-access-item-file-roles-flow.png)
33+
34+
The permission roles map to [simplified standard SharePoint permission groups](https://docs.microsoft.com/en-us/sharepoint/modern-experience-sharing-permissions):
35+
- Members
36+
- Owners
37+
38+
### Using custom-defined roles to grant access
39+
In advanced scenarios where you need to specify a custom-defined permission role, you can do so in the flow action by entering a custom value for the *Roles* property in the following format:
40+
```
41+
roles:<role-id>
42+
```
43+
44+
![Use a custom role to grant access to an item or a file](../../../images/grant-access-item-file-custom-role-flow.png)
45+
46+
If you want to get the role id for the custom-defined role permission, you can do so by navigating to the SharePoint URL in your web browser and then search for that role.
47+
```
48+
https://<your-sharepoint-site>/_api/web/roledefinitions
49+
```
50+
51+
For example:
52+
```
53+
https://contoso.microsoft.com/teams/itweb/_api/web/roledefinitions
54+
```
55+
56+
You can find the role Id in the *category* property of an role item.
57+
58+
![SharePoint site role definitions](../../../images/sp-web-roledefinitions.png)
59+
60+
## Grant access using sharing links
61+
Instead of granting users access to files directly, you can provide access to a specific file using [shareable links](https://docs.microsoft.com/en-us/sharepoint/modern-experience-sharing-permissions#sharable-links).
62+
63+
You can use the '[Create sharing link for a file or folder](https://docs.microsoft.com/en-us/sharepoint/dev/business-apps/power-automate/sharepoint-connector-actions-triggers#create-sharing-link-for-a-file-or-folder)' action to create shareable links for a given file.
64+
65+
> [!NOTE]
66+
> 'Create sharing link for a file or folder' only supports files or folders in a document library. List items are not supported yet.
67+
68+
![Create sharing link for a file or folder flow action](../../../images/create-sharing-link-file-action-flow.png)
69+
70+
When creating a shareable link using the action, you can specify:
71+
- Link type
72+
- Type of sharing link - view and edit or view only
73+
- Link scope
74+
- Who gets access to the link - anyone with the link, including anonymous or people in your organization
75+
76+
## Stop sharing an item or a file
77+
The 'Stop sharing an item or a file' action requires the following inputs:
78+
- SharePoint site address
79+
- List or library name or identifier
80+
- The item or the file identifier for which to stop sharing
81+
82+
![Stop sharing an item or a file flow action](../../../images/stop-sharing-item-action-flow.png)
83+
84+
Applying this flow action will reset all permissions except on that item or the file except for site owners.

docs/business-apps/power-automate/guidance/migrate-from-classic-workflows-to-power-automate-flows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ While the following lists show some of the most common workflow capabilities, Po
185185

186186
|Permissions management action |Sharepoint workflow |Power Automate flow |
187187
|:-------|:-------|:--------|
188-
| Grant access to an item or a folder | Yes | Yes, works only with Modern Permissions |
189-
| Stop sharing an item or a file | Yes | Yes, works only with Modern Permissions |
188+
| Grant access to an item or a folder | Yes | Yes |
189+
| Stop sharing an item or a file | Yes | Yes |
190190
| Create sharing link for a file or folder | Not available | Yes |
191191

192192
### Approval actions
Loading
Loading
Loading
Loading
129 KB
Loading
53.5 KB
Loading

docs/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,8 @@
486486
items:
487487
- name: Working with Get items and Get actions
488488
href: business-apps/power-automate/guidance/working-with-get-items-and-get-files.md
489+
- name: Manage list item and file permissions
490+
href: business-apps/power-automate/guidance/manage-list-item-file-permissions.md
489491
- name: Working with the SharePoint Send HTTP Request action
490492
href: business-apps/power-automate/guidance/working-with-send-sp-http-request.md
491493
- name: Customize SharePoint page approvals

0 commit comments

Comments
 (0)