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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow to auto lock a sh...
Power Automate
Unanswered

Flow to auto lock a sharepoint folder on a specified day of the week

(0) ShareShare
ReportReport
Posted on by 184

Hello,

Not sure if this is an available feature already but would like to have a flow that locks a sharepoint folder (or a file in that sharepoint folder) for a specified date and time. The situation is that we do not want users to be able to edit or access the files every Friday and Saturday of the week.

Thanks in advance!

Categories:
  • bradleyhorton Profile Picture
    187 on at

    Hi @CatPagulayan  The 'stop sharing' and 'grant access' actions should be helpful here as long as the users you don't want accessing aren't Owners of the Document Library/Site.

    You could run a recurring flow each day which check for day of the week then if Friday 'stop sharing', if Sunday 'Grant access'.

  • CatPagulayan Profile Picture
    184 on at

    Hi @bradleyhorton ,

    thank you for the advise. But can you show me how to create a flow for that? Apologies as I am not familiar with what steps to choose in flow for the stop sharing and grant access.. thanks in advance!

  • bradleyhorton Profile Picture
    187 on at

    Hi @CatPagulayan 

     

    Please see image below. I've used switch rather than a condition and then in the stop sharing and grant access actions you just need to direct it at the relevant SharePoint site and Library. Id you add the ID of the top level folder you want to stop access to, then as long as everything below is inheriting permissions in SharePoint, I think the rest will just sort themselves out. I've only used these actions on specific files previously.

    bradleyhorton_0-1605697639875.png

     

  • CatPagulayan Profile Picture
    184 on at

    hi @bradleyhorton ,

    thank you so much for this!! 

    I tried but I ran into an error:

    CatPagulayan_0-1605698559531.png

    my flow is such: as in this simple..

    CatPagulayan_1-1605698595875.png

     

  • bradleyhorton Profile Picture
    187 on at

    @CatPagulayan  annoyingly looks like it doesn't work with Folders then. As I said I've only used with specific files. Not sure if there's another way around this I'm afraid without getting each file in the folder and then using an Apply to each to loop through each one and change them all. Would guess that would take a while to run though.

  • bradleyhorton Profile Picture
    187 on at

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 335 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard