Skip to main content
Post

#PowerPlatformTip 160: 'Set SharePoint Item Permissions with Power Automate'

#PowerPlatformTip 160: 'Set SharePoint Item Permissions with Power Automate'

TL;DR: Call breakroleinheritance on the item, then addroleassignment(principalid, roledefid) via Send an HTTP request to SharePoint. With copyRoleAssignments=false, the connection account retains Manage permissions while you add the intended users or groups.

SharePoint items inherit their permissions from the list by default. When a process needs to lock an item down to just the requester and an approver, you can do the whole thing in Power Automate: stop the inheritance, then bind the right people to the right permission level. No manual sharing, no premium connector.

💡 Challenge

A request item should only be visible to the submitter and the approver, not the whole team. Doing this by hand doesn’t scale, and the standard SharePoint actions don’t expose permission management. You need item-level (fine-grained) permissions applied automatically as part of the flow.

✅ Solution

SharePoint sites, lists and items are SecurableObjects. To give an item unique permissions you first break role inheritance, then add role assignments that bind a principal (user or group) to a role definition (permission level like Read, Contribute, Edit). Both operations are available through Send an HTTP request to SharePoint, which handles auth for you.

🔧 How It’s Done

1. Get the principal ID (the site user or group ID) for the person you want to grant access to.

🔸 Send an HTTP request to SharePoint → Method POST, Uri:

1
_api/web/ensureuser

Header Accept: application/json;odata=nometadata, Body:

1
{ "logonName": "i:0#.f|membership|jane.doe@contoso.com" }

🔸 Read the returned Id (e.g. body('Ensure_User')?['Id']).

2. Get the role definition ID for the permission level you want (Read, Contribute, Edit, Full Control).

🔸 Method GET, Uri:

1
_api/web/roledefinitions/getbyname('Read')?$select=Id

🔸 Keep the returned Id.

3. Break role inheritance on the item so it stops inheriting from the list.

🔸 Method POST, Uri:

1
_api/web/lists/getbytitle('Requests')/items(ID)/breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true)

🔸 copyRoleAssignments=false does not copy existing assignments; SharePoint grants the account making the call Manage permissions. Add the required users or groups after the call. Use true if you want to retain the current assignments and add to them.

Power Automate designer: the Send an HTTP request to SharePoint action with Method POST, the breakroleinheritance Uri on items(42) and the Accept header, followed by the Add role assignment action Step 3 as a Send an HTTP request to SharePoint action: Method POST, the Uri calling breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true) on the item and the Accept header. The next action in the flow is the addroleassignment call from step 4.

4. Grant the permission by adding a role assignment.

🔸 Method POST, Uri:

1
_api/web/lists/getbytitle('Requests')/items(ID)/roleassignments/addroleassignment(principalid=<PrincipalId>,roledefid=<RoleDefId>)

🔸 Repeat step 4 for each user or group you want to add (e.g. the approver).

5. (Optional) Remove access the same way with:

1
_api/web/lists/getbytitle('Requests')/items(ID)/roleassignments/removeroleassignment(principalid=<PrincipalId>)

🎉 Result

The item now has unique permissions applied by the flow. With copyRoleAssignments=false, the account used by the SharePoint connection retains Manage permissions; the additional role assignments grant the intended users or groups their access.

Each item with unique permissions adds a unique security scope. A list or library supports up to 50,000 unique scopes, with fewer than 5,000 recommended for performance. Each scope supports up to 5,000 role assignments.

🌟 Key Advantages

🔸 Standard action only: Send an HTTP request to SharePoint, no premium connector.

🔸 Precise & automated: exact permission levels per user/group, applied consistently on every run.

🔸 Flexible: grant with addroleassignment, revoke with removeroleassignment, or re-inherit with resetroleinheritance.

🛠️ FAQ

1. Why do I have to break inheritance first?

SharePoint has no partial inheritance - permissions are either inherited or unique. breakroleinheritance switches the item to unique so your role assignments actually stick.

2. Which role definition IDs are common?

Rather than hardcoding IDs (they can vary), query roledefinitions/getbyname('Read'|'Contribute'|'Edit'|'Full Control'). If you do hardcode: Read 1073741826, Contribute 1073741827, Edit 1073741830, Full Control 1073741829.

3. I get a 403 / “Insufficient privileges” on breakroleinheritance.

The account behind the SharePoint connection needs Full Control / Manage Permissions on the site. GET calls can succeed while permission changes fail - add the connection account as a site owner (or grant app-only Full Control if running as an app).

4. How do I undo unique permissions later?

Call _api/web/lists/getbytitle('Requests')/items(ID)/resetroleinheritance to make the item inherit from the list again.

🎥 Video Tutorial

This tip is by Marcel Lehmann, Microsoft MVP (Business Applications) and founder of the Power Platform Academy, which runs free live workshops (in German). See the next free workshop dates (in German). For companies that want this implemented for them, see KMUpower: Power Platform consulting & automation for SMEs (DACH).

This post is licensed under CC BY 4.0 by the author.

Microsoft and the Power Platform product names (for example Power Apps, Power Automate, Copilot Studio) are trademarks of the Microsoft group of companies. This is an independent website. It is not operated, sponsored or endorsed by Microsoft.