Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
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?  

  • abm abm Profile Picture
    32,464 Most Valuable Professional on at
    Re: View Only file in OneDrive is Locking

    Yes, Always use a unique filename. Try it and see if that works.

  • Fatal_Lordes Profile Picture
    38 on at
    Re: View Only file in OneDrive is Locking
    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,464 Most Valuable Professional on at
    Re: View Only file in OneDrive is Locking

    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow