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 / 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,865 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,865 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

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