Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Set permissions for a SharePoint list or library with Power Automate

Posted on August 3, 2022August 3, 2022 by Tom

“Is there a way to set permissions for the whole SharePoint list after creation by a Power Automate flow?”


All (both) the SharePoint permission actions in Power Automate are designed to work with items or documents. You can stop sharing item or a file, and then assign permissions to specific users or M365 groups. But what if you want to go one level higher? Reduce permissions not only on an item or a file, but on a whole list that you just created?

As many times before, you’ll need an HTTP request.

Remove list permissions

It’s the same HTTP requests as when you manage item / file permissions with a small difference in the url. Instead of referencing the specific item, you stop at the list level.

For example, to break permission inheritance:

Method: POST

Uri:
_api/web/lists/getByTitle('<ListName>')/breakroleinheritance(true)

instead of 

_api/web/lists/getByTitle('<ListName>')/items(<FolderID>)/breakroleinheritance(true)

List all users with permissions:

Method: POST

Uri:
_api/web/lists/getByTitle('<ListName>')/roleassignments

Remove user permissions:

Method: POST

Header:
{
  "X-HTTP-Method": "DELETE"
}

Uri:
_api/web/lists/getByTitle('<ListName>')/roleassignments(<PrincipalId>)

Add list permissions

The same applies also when you want to assign some user permissions back:

Method: POST

Uri:
_api/lists/getByTitle('<listName>')/roleAssignments/addRoleAssignment(PrincipalId=<groupID>,roleDefId=<roleID>)
Power Automate SharePoint list permissions

Restore list permissions

And also to restore original permissions from the site level:

Method: POST

Uri:
_api/Web/lists/getByTitle('<listName>')/ResetRoleInheritance()

Summary

As you can see, you can manage SharePoint list permissions with Power Automate in the same way as list and file permissions – if you stick to the HTTP requests. All you have to do is skip the item / file part from the request uri and it’ll manage permissions on the whole list or library.


πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

4 thoughts on “Set permissions for a SharePoint list or library with Power Automate”

  1. David says:
    January 3, 2023 at 11:54 am

    Can you show the configuration of the “parse JSON” action, please?

    Reply
    1. Tom says:
      January 9, 2023 at 4:21 pm

      Hello David,
      you can get the configuration if you add the HTTP actions in a flow, run it, and take the whole output of the 2nd http request (…/roleassignments) as the sample payload as explained here: https://tomriha.com/where-do-i-get-schema-for-the-parse-json-action-in-power-automate/

      Reply
  2. darla walsh says:
    April 27, 2023 at 7:39 pm

    Hello, I’ve followed this flow, but my flow keeps failing the apply to each. I get an error code that the “result” is of Type ‘Null’. the result must be a valid array. I’m not sure what I’ve missed.

    Reply
    1. Tom says:
      May 21, 2023 at 5:19 pm

      Hello Darla,
      the ‘results’ input of the Apply to each is most probably empty, I’d check the HTTP requests if they return some other value than [].

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes