How to Fix Power Automate SharePoint Create File Locked Error
Question details
A SharePoint Create file action in Power Automate fails, showing a message that the file is locked for shared use by the flow owner.

- Product
- Power Automate / SharePoint Online
- Device & OS
- not provided
- Scenario
- Running a custom Power Automate flow to automatically create or update a file within a SharePoint document library.
- Observed behavior
- The flow execution fails and returns an error indicating the target file is locked for shared use, preventing the creation or modification action.
Verify that you have sufficient permissions to create and edit files in the target SharePoint document library, and ensure no other users currently have the target file open.
Test Direct File Creation in SharePoint
Determine if the issue is with the SharePoint library's configuration or isolated to the Power Automate flow itself.
Before modifying the flow, it is crucial to test whether the SharePoint library allows manual file creation by the flow owner. This isolates permission or site-level issues from flow-specific logic.
Open your web browser, log in to Microsoft 365, and navigate to the specific SharePoint Online document library where the flow is trying to create the file.
Click on the 'New' button in the SharePoint ribbon and select 'Word document' or 'Excel workbook' to try creating a blank file directly.
If you can create the file successfully without errors, the library permissions are correct, meaning the locked error is caused by your specific Power Automate flow configuration.

Review and Adjust Power Automate Flow Settings
Check the flow for conflicting actions, incorrect paths, or looping mechanisms that might cause the file to lock itself.
Discover WPS Office for Seamless Document Management
If you are tired of dealing with complex SharePoint sync issues and file lock errors, consider switching to WPS Office. It provides a lightweight, highly compatible, and free alternative to standard office suites for your daily document creation and editing needs.
- 1. Download the Installer: Visit the official WPS Office website and click the 'Free Download' button for your operating system.
- 2. Install the Software: Run the downloaded installer file and follow the simple on-screen instructions to complete the setup.
- 3. Start Creating Documents: Open WPS Office to immediately start creating, editing, and saving your documents without worrying about cloud-locking errors.

Frequently Asked Questions
Why does Power Automate say my SharePoint file is locked?
This error usually occurs when the flow attempts to modify or overwrite a file that is currently open by a user, being synced by OneDrive, or being accessed simultaneously by another parallel action within your flow.
How long does a SharePoint file lock last?
If a file is locked by a process or user session that disconnected unexpectedly, the lock typically expires automatically after 10 to 15 minutes of inactivity.
Can I force unlock a file in SharePoint?
Yes. If you have site owner or admin privileges, you can often release a lock by requiring check-out in the library settings, checking the file out yourself, and then checking it back in. Alternatively, Microsoft 365 admins can end user sessions.
Do loop actions in Power Automate cause file locking?
Yes. If an 'Apply to each' loop has concurrency control enabled and multiple iterations attempt to update the exact same file at the same time, SharePoint will lock the file. To fix this, disable concurrency or set the degree of parallelism to 1.




