How to know who view files/pages on SharePoint

A couple of days ago I come across a SharePoint feature that is very useful to check who view the file that is a SharePoint document library. This feature can be very useful to check who viewed that particular file. This feature will allow you do understand you saw your meeting records if you’re saving then on SharePoint.

 Usually, that feature is deactivated on all the sites. So, I will provide a PnP PowerShell to active this feature quickly on multiple sites. When that happens this is the information we’ve on a certain file.

If you want to active this using the SharePoint User Interface:

  1. Go to Site Settings
  2. Select Managed Site Features
  3. Search for SharePoint Viewers
  4. Click to activate that feature.

That will allow you to view these type of files as follows

If you want to have this on multiple sites, the easiest way to do that is using the PnP PowerShell below that will activate this feature on all the sites.

$sites = @(
    "https://Contoso.sharepoint.com/sites/SiteB",
    "https://Contoso.sharepoint.com/sites/SiteA"
)
$featute = "fa6a1bcc-fb4b-446b-8460-f4de5f7411d5"

foreach ($site in $sites) {
    Connect-PnPOnline -Url $site -UseWebLogin    
    Enable-PnPFeature -Identity $featute -Force -Scope Web
}

Other Articles

3 Comments

  1. Melanie Hermann said:

    Is there a way to get viewers from a specific date? I want to get a list of all the viewers of my site on a specific date.

    Thanks,
    Mel

    March 4, 2022
    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *