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 / View Only file in OneD...
Power Automate
Unanswered

View Only file in OneDrive is Locking

(0) ShareShare
ReportReport
Posted on by 38

Hey all

 

So I thought if I locked everyone down to read only access to a shared folder in Onedrive, that would allow me to update the file even if people have it open to view.  Obviously not because my flow fails saying the file is locked.

 

Is there a way around this?  Basically my flow is pretty simple.

1. Email comes in that meet criteria.

2. The attachment in the email is identified.

3. The attachment in the email is copied to folder in OneDrive as the same file name.

4. A teams chat is updated to say here is link to the file.

 

My issue is, folder is shared as view only, but if someone opens the file and doesn't close it, my flow is stopping at point 3 because it can't overwrite as it says file is locked.  Is there a way around this?  

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @Fatal_Lordes 

     

    Unfortunately there are no work around for this. This is by design. The other option is when you copy the filename create the filename using date, hours and seconds to generate a unique name. Use the formatDate(utcNow(), 'dd_MM_yyyy_hh_mm_ss')

     

    You may need to use the split() expression too.

     

    concat(first(split('test.docx','.')),'_',formatDate(utcNow(), 'dd_MM_yyyy_hh_mm_ss'))

     

    This will give you test_29_05_2024_12_42_33

     

    Then to add the extension combine the first expression with another split to get the extension (.docx)

     

    contact(concat(first(split('test.docx','.')),'_',formatDate(utcNow(), 'dd_MM_yyyy_hh_mm_ss')),'.',last(split('test.docx','.')))

    Thanks

  • Fatal_Lordes Profile Picture
    38 on at
    Thanks for this, ABM. I did suspect it was actually working as designed. I will give your suggestion a try to see if that gets around it and then I will just have to remember to periodically log in and delete all the dummy ones created.
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Yes, Always use a unique filename. Try it and see if that 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard