0

We have lots of sites and files in SPO In an SPFx webpart, I need to warn the user about a certain file being open by any user.

I use PnP/JS getLockedByUser() function of IFIle type to get the current locked by user. The problem is that I get undefined results for any user other than the current user.

If the file is open by anyone else, the code "think" no one has it open and will fail because the file is open.

Is there a Rest, graph or C# option, to try in an azure function,to check it?

Thanks

1 Answer 1

0

I'm not sure if it helps. I use this Uri in Power Automate to get information who locked file in SharePoint online. _api/web/GetFileByServerRelativeUrl('')/lockedByUser. It returns JSON with information about user.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.