In this post I’m going through the steps to update SharePoint Item-level permissions using Power Automate and The SharePoint Rest API.
![Set SharePoint Item-Level Permissions using Power Automate Default settings for SharePoint Item-Level Permissions](https://i0.wp.com/sharepains.com/wp-content/uploads/2024/06/image-12.png?resize=640%2C233&ssl=1)
Item-Level Permissions
Table of Contents
Within the Advanced settings of a SharePoint list, the Item-Level Permissions the default settings are Read all items and Create and edit all items. You might however sometimes want to switch this to Read items that were created by user and Create items and edit items that were created by the user.
![Set SharePoint Item-Level Permissions using Power Automate Adjusted settings for SharePoint Item-Level Permissions](https://i0.wp.com/sharepains.com/wp-content/uploads/2024/06/image-13.png?resize=640%2C251&ssl=1)
Using the SharePoint UI this is easy to update, but what if you want to update this as part of a site template.
Now I found a way to do this using PowerShell, but I really wanted to do this using Power Automate. Using out of the box Power Automate action, I can avoid the complexity of Azure Automate/Functions.
REST API for Item-Level Permissions
So now if we want to do the same in Power Automate then we can do this using the following flow settings:
![Set SharePoint Item-Level Permissions using Power Automate A flow in Power Automate to change the Adjusted settings for SharePoint Item-Level Permissions](https://i0.wp.com/sharepains.com/wp-content/uploads/2024/06/image-15.png?resize=640%2C399&ssl=1)
Method: PATCH
Uri: /_api/web/lists/getbyTitle('Listname')
Accept: application/json; odata=nometadata
Content-type: application/json; odata=nometadata
IF-MATCH: *
Body: {
"ReadSecurity": 2,
"WriteSecurity: 2
}
So with a simple REST API call in Power Automate we can update those advanced settings in SharePoint Online.
Discover more from SharePains by Microsoft MVP Pieter Veenstra
Subscribe to get the latest posts to your email.