How to disable Likes, Views and Save for later on modern SharePoint pages?
All modern SharePoint pages in Communications and Team Sites include a social bar at the bottom of the page. In this bar a user can like, view, and save the page for later and the component is located at the bottom of the page after all the content.
If you are looking to disable this feature for a particular site or even for the entire organization, let me tell you that there is no graphical user interface to do it, but thankfully it can be easily done using PnP PowerShell.
In order to execute the code provided in this article you must install the latest version of the PnP PowerShell module, more information about how to do it can be found here.
Disable SharePoint social bar in a single site using PnP PowerShell
To disable the social bar on a single site you must do the following:
- Open the PowerShell command line
- Execute the following cmdlet to connect to the SharePoint site (replace the URL by the URL of the site from where you want to remove the social bar)
Connect-PnPOnline -url https://conoso.sharepoint.com/sites/projectx -interactive
- Execute the following cmdlet to remove the social bar
Set-PnPSite -SocialBarOnSitePagesDisabled $true
Disable SharePoint social bar globally using PnP PowerShell
To disable the social bar globally in the tenant you must do the following:
- Open the PowerShell command line
- Execute the following cmdlet to connect to the SharePoint site (replace contoso by the name of your tenant)
Connect-PnPOnline -url https://conoso-admin.sharepoint.com
- Execute the following cmdlet to remove the social bar
Set-PnPSite -SocialBarOnSitePagesDisabled $true
At any given moment if you want to bring back this feature you just need to connect to the site or to the tenant administration using PnP PowerShell and then execute the following cmdlet.
Set-PnPSite -SocialBarOnSitePagesDisabled $false
February 2, 2023
Thank you so much for this useful trick! Exactly what I was looking for!
May 7, 2023
Would be great to be able to do this on a single page, typically the request is for the communication site landing page.