Allow users to see and edit only the files they uploaded
/ 1 min read
Table of Contents
The problem
Microsoft doesn’t allow users to see and edit only the files they uploaded themselves in a Document Library like in the List. There is no out-of-the-box option to turn on this feature like for the List Items.
Solution
Connect to your SharePoint site vina PnP.
Connect-PnPOnline -Url "https://tenantname.sharepoint.com/sites/yoursitename" -ClientID "yourClientID"Setup the ReadSecurity and Write security properties.
$docLib = Get-PnPList "YourDocumentLibraryName" -Includes ReadSecurity$docLib.ReadSecurity = 2$docLib.WriteSecurity = 2$docLib.Update()Apply the changes
Invoke-PnPQuery