Forum Discussion
"The resource you are attempting to access is locked" when deleting SharePoint file
I uploaded a file to SharePoint and opened it in the browser (e.g., a Word document). After closing the browser tab, I attempted to delete the file via the Graph API but received the error message: "The resource you are attempting to access is locked."
How long does the file remain locked?
After about 20 minutes, I was able to delete the file without any issues. This is quite inconvenient, as I would like to delete the file immediately -> especially since no one else was editing or viewing it in the meantime.
Are there any settings that control this locking behavior? Alternatively, is there a way to release the lock via the Graph API?
Thanks for your help.
1 Reply
- teresahomeyerCopper Contributor
I was able to get around this error by re-navigating to the file via 'site contents > document library". I received a pop up saying the file was open by someone else, clicked 'delete' on the pop up prompt and it worked.