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

How to restore SharePoint item/file permissions (Power Automate)

Posted on October 31, 2021April 12, 2023 by Tom

“I know that Power Automate has an action to break permissions on a file in SharePoint, but how can I reverse it to restore the permission inheritance?”


There’re two standard actions in Power Automate to manage permissions within SharePoint. One is the ‘Stop sharing an item or a file’ that will break permissions inheritance and remove almost all permissions. The second one is the ‘Grant access to an item or a folder’ action to assign specific permissions. Using these actions you can easily manage permission without HTTP requests as already explained.

But there’s another operation that doesn’t have its own action: restoring permissions inheritance. Once there’s no more reason to keep permissions unique, you should always restore their inheritance. One reason is that unique permissions are terrible to manage. The other is that SharePoint has a limit of 50.000 unique permissions, you can’t keep unique permissions for everything.

Restore the permissions inheritance with an HTTP request

Since there’s no direct action to restore the permissions, you must go back to HTTP requests. You’ll need a reverse HTTP request to the one breaking the role inheritance. Instead of BreakRoleInheritance() it must be ResetRoleInheritance().

Method: POST

Uri:
_api/Web/lists/getByTitle('<list name>')/items(<item id>)/ResetRoleInheritance()

Note: < … > are placeholders, replace them including the < and >.

Power Automate restore permissions SharePoint

Such HTTP request will remove all unique permissions from the item and restore the permissions inheritance. It can be used on a SharePoint item, document, or a whole list or a library (if you skip the items() part).

Summary

As many times before, if Power Automate doesn’t give you an action to restore SharePoint permissions directly, you must use an HTTP request. It’s a simple request where all you need is the site address, name of the list/library, and id of the item/file. It’ll remove all unique permissions and reset them back to the parent permissions – let it be a folder, a list or a library.

And if you’re not sure which files/folders have unique permissions, you can list them using another HTTP request.


πŸš€ Master Power Automate

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

No spam. Unsubscribe anytime.

8 thoughts on “How to restore SharePoint item/file permissions (Power Automate)”

  1. Priya S says:
    April 12, 2023 at 8:40 am

    This one restores the unique permissions at the library level, but if some of the files in the library has unique permissions its not restoring them. How can we achieve this?

    Reply
    1. Tom says:
      May 1, 2023 at 3:27 pm

      Hello Priya,
      you can list all the documents as explained in this article: https://tomriha.com/get-list-of-all-documents-with-unique-permissions-power-automate/ and then restore permissions one by one.

      Reply
  2. Ricardo says:
    May 29, 2023 at 3:23 pm

    what is the minimum privilege you need over an item to successfully execute the call?

    Reply
    1. Tom says:
      August 12, 2023 at 10:29 pm

      Hello Ricardo,
      I’m not sure, I guess Edit should be enough, but of course it’d be better if the flow runs under some “service account” who’s owner of the site.

      Reply
  3. Scott says:
    April 2, 2024 at 4:53 pm

    Thanks Tom!
    What would cause a BadGateway error when running this ResetRoleInheritance?
    It gets to that point and then just retries a bunch of times before giving up 😟

    Scott

    Reply
    1. Scott says:
      April 2, 2024 at 5:59 pm

      I figured it out! I need owner permission on the folder/library before I can run it. (I never found that in the docs but it makes sense…)
      Love the blog

      Reply
      1. Tom says:
        April 17, 2024 at 10:24 pm

        Hello Scott,
        yes, you need permissions to be able to restore permissions, good job figuring it out.

        Reply
  4. Jake Mannion says:
    August 19, 2024 at 7:41 am

    Nice one – thanks. Saved me some time this evening!

    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