SOLVED

Lock file from being read by more than one user at a time

%3CLINGO-SUB%20id%3D%22lingo-sub-1640577%22%20slang%3D%22en-US%22%3ELock%20file%20from%20being%20read%20by%20more%20than%20one%20user%20at%20a%20time%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1640577%22%20slang%3D%22en-US%22%3E%3CP%3ENote%3A%20I'm%20fully%20aware%20that%26nbsp%3Bthis%20request%20might%20not%20make%20much%20sense%2C%20but...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3E%3CSTRONG%3EIs%20it%20possible%20to%20lock%20a%20certain%20document%20library%20(or%20individual%20files%20for%20that%20matter)%20from%20being%20opened%20and%20read%20by%20more%20than%20one%20user%20simultanously%3F%20%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20my%20case%2C%20it's%20pdf%20files.%20I'm%20basically%20looking%20for%20a%20way%20of%20checking-out%20and%20locking%20a%20file%20reading.%20If%20the%20pdf%20is%20opened%20already%20by%20someone%3B%20the%20next%20person%20trying%20to%20open%20it%20should%20preferably%20get%20a%20warning%20along%20the%20lines%20of%20%22Sorry%2C%20this%20document%20is%20already%20being%20read%20by%20John%20Doe%2C%20and%20needs%20to%20be%20closed%20before%20you%20can%20read%20it.%22%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1640577%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1643000%22%20slang%3D%22en-US%22%3ERe%3A%20Lock%20file%20from%20being%20read%20by%20more%20than%20one%20user%20at%20a%20time%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1643000%22%20slang%3D%22en-US%22%3ENot%20possible%20out%20of%20box.%20You%20can%20check%20out%20for%20editing%20but%20not%20reading.%20%3CBR%20%2F%3E%3CBR%20%2F%3EHowever.%20Just%20thinking%20out%20loud%20you%20could%20Probably%20craft%20a%20power%20automate%20flow%20to%20handle%20this.%20You%20would%20have%20to%20somehow%20get%20limited%20access%20for%20view%20files%20in%20directory%20and%20have%20a%20flow%20for%20granting%20access%20for%20x%20amount%20of%20time.%20Or%20two%20flows%20for%20check%20out%20and%20check%20in.%20And%20you%20have%20the%20flow%20only%20run%20and%20allow%20for%20an%20individual%20one%20at%20a%20time.%20So%20it%20could%20be%20done.%20But%20not%20out%20of%20box.%3C%2FLINGO-BODY%3E
Contributor

Note: I'm fully aware that this request might not make much sense, but...

 

Is it possible to lock a certain document library (or individual files for that matter) from being opened and read by more than one user simultanously?

 

In my case, it's pdf files. I'm basically looking for a way of checking-out and locking a file reading. If the pdf is opened already by someone; the next person trying to open it should preferably get a warning along the lines of "Sorry, this document is already being read by John Doe, and needs to be closed before you can read it."

4 Replies
best response confirmed by Tormod Solem Slupphaug (Contributor)
Solution
Not possible out of box. You can check out for editing but not reading.

However. Just thinking out loud you could Probably craft a power automate flow to handle this. You would have to somehow get limited access for view files in directory and have a flow for granting access for x amount of time. Or two flows for check out and check in. And you have the flow only run and allow for an individual one at a time. So it could be done. But not out of box.

"Or two flows for check out and check in".

But would that, simply checking out a pdf, prevent others from reading it?

I meant a flow called that. You could name it whatever but it wouldn’t be a “check out”. The flow would be granting access to the file when the flow runs. Then after a period or time revoke that or have them check in flow to remove that permission.
I see :) Not sure if I got the experience needed to get something like this up and running, but thanks a lot for your replies :)