Have you locked a file within the SharePoint document library? Well, in this SharePoint Online tutorial, we are going to discuss what is Lock File in SharePoint Document Library, and how to secure external sharing in the SharePoint document library.
File Lock in SharePoint Document Library
In the SharePoint document library, we can share and give access to the users to collaborate on the dataset such as files, folders, etc. Also, we can lock the file in the SharePoint document library, where other users can not collaborate on it together.
Apart from these, the SharePoint document library allows us to set the password while sharing with external users. As a result, we can secure our files.
let’s get started on how to secure an external sharing in the SharePoint document library.
Also, read: SharePoint Document Library Views [Create, Edit, Delete]
Secure external sharing in the SharePoint document library
While Sharing files, folders, or documents with external users, the SharePoint document library allows us to lock the file for security reasons. Along with this, if we want to share a secured file with a single external user, only that user can unlock the file and view it by entering the password.
To lock a file within the SharePoint document library and share it with an external user, we need to follow the below-mentioned steps:
- Enable the Anyone with the link option in SharePoint Online.
- Enable Sharing Settings to Anyone for the User Site.
- Deactivate the Limited-access user permission lockdown mode.
- Share the File with file locking in the SharePoint Online document library.
Enable the Anyone with the link option in SharePoint Online
The SharePoint document library allows users to share files and documents with external users, who have the link. The ‘Anyone with the link option’ is turned off in SharePoint Online. So we will enable it by the below procedures:
- Sign in to the SharePoint Admin Center with your Microsoft credential.
- Expand Policies, which appear on the left navigation of the page -> Click on Sharing.

- In Sharing page, move the slider to the top and set it to Most permissive, Anyone( where Users can share files and folders using links that don’t require sign-in)

- Then click on the OK button to save the changes.
Enable Sharing Settings to Anyone for the User Site
Once we enable external sharing with anonymous access at the Tenant level. we need to make sure to enable Sharing Settings to Anyone for the User’s Site.
- Open the SharePoint admin center, Expand Sites, and click on Active sites.

- Search and select the site where we need to enable sharing settings. Example: Rena Technologies. -> Click on the Site name of our site as shown below:

- Go to Settings -> In the External sharing options, choose Anyone.

- Click on the Save button to enable sharing settings with Anyone.
Also, read: SharePoint Online document library folder level permissions
Deactivate the Limited-access user permission lockdown mode
When the Limited-access user permission lockdown mode is enabled, permissions for users in the “limited access” permissions level (such as Anonymous Users) are reduced, preventing access to Application Pages.
- Go to the Site Settings page -> Under Site Collection Administration, Select the Site collection features.

- Go to Limited-access user permission lockdown mode, Click on the Deactivate button.

- The next page appears to confirm the deactivation of the Limited-access user permission lockdown mode feature, Click on the Deactivate this feature.

This is how we can Deactivate the Limited-access user permission lockdown mode.
Share the File with file locking in the SharePoint Online document library
Here, we will see how to lock the file in SharePoint Online document library
- Open the SharePoint Online document library, where we uploaded a file, and select the file which we want to share the file with Lock.

- Click on the Share option, which is represented at the top of the page or else in the toolbar.

- A dialogue box appears with a send link, click on the Anyone with the link can view as shown below:

- In Sharing settings, select Anyone -> Uncheck the editing option -> Set a password, when we are setting a password it suggests strong else it displays whether the password is weak, fair, or good.

- We can enable Block download option, where we want to block the shared file from downloading -> Then click on the Apply button.
- Now we can copy and share the file manually with the external user, with whom we want to share the file with lock.

- Once we shared a link with the external user when they try to open the file, it will ask for a password to unlock it.

This is how we can Secure external sharing in the SharePoint document library.
You might be interested in these SharePoint Online lists and library tutorials:
- SharePoint Online list vs document library
- Person Column in SharePoint Online list or document library
- How to Add a Link to SharePoint Online Document Library
- SharePoint Document Library Check in and Check out
Conclusion
In this SharePoint Online tutorial, we discussed what SharePoint document library file locking and also we discussed secure external sharing in the SharePoint document library.
Bijay Kumar Sahoo is a highly accomplished professional with over 15 years of experience in the field of SharePoint and related technologies. He has been recognized as a Microsoft MVP (Most Valuable Professional) more than 9 times, starting from April 2014, for his exceptional contributions to the SharePoint community. Bijay is also a prolific author, having written two books on SharePoint – “Microsoft Power Platform – A Deep Dive” and “SharePoint Online Modern Experience Practical Guide“. His deep insights into SharePoint are also shared on his popular YouTube channel EnjoySharePoint where he teaches SharePoint to a global audience (From various countries like the United States of America, Canada, the United Kingdom, Australia, New Zealand, etc). Read more…