cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Inheriting SharePoint Permissions HTTP

I'm successfully using Flow to break permission inheritance on documents within a library based on the status of a document.  This was working wonderfully when the status was set via the flow, the users now want to manually change the status.

 

"Status A" may mean that there are three permission groups that have different levels of access to a document, whereas "Status B "means that only two groups have different permission levels of access to the file and so on.  I am trying to keep my flow simple, so I'm wondering if there is a way to easily remove the unique permissions from the document so that I can recreate them based on the new status?  I've tried deleting the groups with http request, method Delete and getbyprincipalid but that only works if I know which groups currently have access to the document.  The flow fails if the group doesn't have any access. 

 

I'm thinking it would be easier to just re-inherit the permissions from the library and recreate them again but I can't find any information about inheriting permissions in a flow.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper II
Helper II

Re: Inheriting SharePoint Permissions HTTP

I think I figured it out, resetroleinheritance() seems to work.  Not sure if this is the best way though.

View solution in original post

3 REPLIES 3
Highlighted
Helper II
Helper II

Re: Inheriting SharePoint Permissions HTTP

I think I figured it out, resetroleinheritance() seems to work.  Not sure if this is the best way though.

View solution in original post

Highlighted
Frequent Visitor

Re: Inheriting SharePoint Permissions HTTP

Hi!
What´s the Uri to achieve this?

 

Thanks.

Highlighted
Helper II
Helper II

Re: Inheriting SharePoint Permissions HTTP

Hi @DanielCostaO365  this Uri will break the permission inheritance on the list/library and remove all of the groups that currently have access, you will then need to  do a HTTP call for each group you want to grant access to.  I used the ID from dynamic content in my Uri

 

/_api/web/lists/getByTitle('Your list title')/items(ID)/breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true)

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (6,911)