web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Delete all sharing lin...
Power Automate
Unanswered

Delete all sharing links of a folder

(0) ShareShare
ReportReport
Posted on by 14

Hi all,

 

I have the following problem: On my sharepoint site I have a library called "docs" and in this library is one folder called "test" (no subfolders or anything like that). I want to delete all sharing links of folder "test" with a flow. 

 

Of course the described issue is not exactly my usecase, but to give it propper names, this is the best way 🙂

 

So far my research on this issue went, the only way to approach this is a http request because the preset command "stop sharing an item or file" does not work for folders. I tried to find a solution for the last several hours, but I was not successfull. Maybe anybody else has a solution for my issue. 

 

thanks a lot in advance 🙂

Categories:
I have the same question (0)
  • v-litu-msft Profile Picture
    on at

    Hi @bautschi12345,

     

    Stop sharing link of the SharePoint folder using HTTP request is the only way so far, there is no direct action could approach that. Here is a method created by abm, you could refer to it:

    Stop sharing permission to a person for a SharePoi... - Power Platform Community (microsoft.com)

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • bautschi12345 Profile Picture
    14 on at

    Hi @v-litu-msft ,

     

    thank you for your quick response. During my research I was able to found this solution from abm, but was not able to transfer it to my exact problem. I tried a lot variations of the following code, but was never successful:

    Screenshot 2021-03-18 070425.jpg

     

    The error message on this is "Cannot find resource for the request breakroleinheritance", so I assume my URI has some issues, but all variations I tried also failed.

     

    Best Regards

    Thomas

  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @bautschi12345,

     

    How about adding the "/ListItemAllFields" into it?

    /_api/web/GetFolderByServerRelativeUrl('folderRelativeUrl')/ListItemAllFields/breakroleinheritance(true)

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • bautschi12345 Profile Picture
    14 on at

    Hi @v-litu-msft,

     

    thank you so much, now it works 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard