office 365 – SharePoint rest api to find out if a File in Document library is currently being edited by someone


Is there a way to find out if a File in a Document Library is currently being edited or someone has the file open in their browser for editing?

I need this because, sometimes when the Power Automate updates the file properties and if some user already had the document open and saves it after the Power Automate updates the file properties, all those changes made by Power Automate (Flow) are reverted.