Permission & Access Issues

How to Lock SharePoint Files for Editing with Power Automate

Anum MushtaqAnum Mushtaq Nov 2, 2026 871 views

Question details

The user wants to prevent visitors or members from editing a SharePoint file temporarily while a Power Automate workflow is running or when the file's metadata status is marked as In Progress.

How to Lock SharePoint Files for Editing with Power Automate
Product
SharePoint and Power Automate
Device & OS
not provided
Scenario
Securing document integrity by restricting edit access during an active automated workflow or review cycle.
Observed behavior
By default, files remain editable by site members during workflows unless item-level permissions are explicitly modified or the file is checked out.
Before you start

Ensure you have Site Owner or Full Control permissions in your SharePoint environment to modify access rights, and verify that your Power Automate account has the necessary licenses to manage item-level permissions.

Solution 1Recommended

Modify Item-Level Permissions in Power Automate

The most effective way to lock a file during a workflow is to dynamically remove edit permissions and replace them with view-only permissions using Power Automate actions.

SharePoint inherits permissions from the parent site by default. To lock a specific document, your flow must break this inheritance and assign custom permissions for the duration of the workflow.

If you encounter complex permission routing issues, posting your specific flow structure in the Microsoft Power Automate Community can yield custom, advanced workflow advice.

1
Stop sharing the item

In your Power Automate flow, add the 'Stop sharing an item or a file' action. Select your Site Address, Library Name, and the Item ID. This removes all existing user permissions except for the site owners.

2
Grant read-only access

Add the 'Grant access to an item or a folder' action immediately following the previous step. Input the necessary Site Address, Library, and Item ID, then specify the user or SharePoint group. Set the 'Roles' dropdown to 'Can view' to grant read-only access.

3
Restore edit permissions

At the end of your workflow (e.g., after an approval is granted or status changes from 'In Progress'), use the 'Grant access to an item or a folder' action again, but this time set the role to 'Can edit' to unlock the file.

Modify Item-Level Permissions in Power Automate
Community Support: Because permission actions can permanently alter your document library's access rights if configured incorrectly, it is highly recommended to test this flow in a dedicated SharePoint test site first.
Free Microsoft Office alternative

Manage and Share Documents Seamlessly with WPS Office

If you are looking for an intuitive way to manage documents without dealing with complex SharePoint workflows, WPS Office provides a free, lightweight, and highly compatible alternative. It includes built-in cloud storage and straightforward permission controls.

  1. 1. Open and Save to WPS Cloud: Open your document in WPS Office and easily save it to the built-in WPS Cloud for secure access from anywhere.
  2. 2. Share with Specific Permissions: Click the 'Share' button in the top right corner. Choose whether to generate a link or invite collaborators via email.
  3. 3. Lock Editing Access: Select 'View Only' in the permission settings to instantly prevent others from making unauthorized edits to your document.
Fully compatible with Microsoft Office formats, including .docx, .xlsx, and .pptx.Built-in file sharing with simple 'View Only' or 'Edit' permission settings.Lightweight software that runs quickly on Windows, Mac, Linux, and mobile devices.Familiar user interface requiring zero learning curve for seamless migration.Completely free for standard personal and professional use.
microsoft office alternative - wps office

Frequently Asked Questions

Why do users still have edit access after the Power Automate workflow starts?

If item-level permissions are not explicitly altered or the file is not checked out by the workflow, default SharePoint site permissions will continue to apply, allowing members to edit the document as usual.

Can I lock a SharePoint file based on a metadata column like 'In Progress'?

Yes, you can configure a Power Automate flow to trigger 'When an item or a file is modified'. If the condition detects that the status column equals 'In Progress', the flow can then execute the actions to change the item's permissions to read-only.

What happens if a workflow fails while a file is locked?

If the workflow stops or fails before the permissions are restored or the file is checked back in, the file will remain locked. A site owner or administrator will need to manually restore edit access or discard the checkout in SharePoint.