skip to content
Federico's Blog
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.

Terminal window
Connect-PnPOnline -Url "https://tenantname.sharepoint.com/sites/yoursitename" -ClientID "yourClientID"

Setup the ReadSecurity and Write security properties.

Terminal window
$docLib = Get-PnPList "YourDocumentLibraryName" -Includes ReadSecurity
$docLib.ReadSecurity = 2
$docLib.WriteSecurity = 2
$docLib.Update()

Apply the changes

Terminal window
Invoke-PnPQuery

Demo Video

LinkedIn relative post

https://www.linkedin.com/posts/federicotosetto_why-microsoft-doesnt-allow-users-to-see-activity-7418936537641336832-NulQ?utm_source=share&utm_medium=member_desktop&rcm=ACoAACKJlEABegKcSpQKizAvOzyH46f6JvcIZbM