cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SharepointDeve
Helper I
Helper I

Remove all external Users or Re-inherit normal permissions on a folder

I have a Document Library within Sharepoint. As part of an External Customer Project, we share the folders respective to people outside of the organization. I created an archiving flow that gets the folder selected and move it to a new document library called archiving. In the process, I need to remove anyone that is not part of our organization that was shared to the folder. The connector for File or Item does not work on Folders. Please help with how to do this. The moving the folder and files works perfect, I am just not sure what to put in the circle to remove the sharing off a folder. Basically if it can just "Unbreak" inheritance it would be fine, but mostly worried about the external users

SharepointDeve_0-1634223868259.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
SharepointDeve
Helper I
Helper I

Figured it out so I will post in case anyone else ever wonders. Its just resetting to inheritance based on the uri field.

 

So in the HTTP request to sharepoint use this along with the URL of your site the Library is on and change "Documents" to whatever your Document Library is called

SharepointDeve_0-1634248977704.png

/_api/web/lists/getByTitle('LibraryNameHere')/items(UseDynamicContentID)/resetroleinheritance()

so mine was:

/_api/web/lists/getByTitle('Documents')/items(@{triggerBody()?['entity']?['ID']})/resetroleinheritance()

View solution in original post

1 REPLY 1
SharepointDeve
Helper I
Helper I

Figured it out so I will post in case anyone else ever wonders. Its just resetting to inheritance based on the uri field.

 

So in the HTTP request to sharepoint use this along with the URL of your site the Library is on and change "Documents" to whatever your Document Library is called

SharepointDeve_0-1634248977704.png

/_api/web/lists/getByTitle('LibraryNameHere')/items(UseDynamicContentID)/resetroleinheritance()

so mine was:

/_api/web/lists/getByTitle('Documents')/items(@{triggerBody()?['entity']?['ID']})/resetroleinheritance()

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (995)