Skip to main content

Enable or Disable the Social Bar (Like, Views, Save for later) in SharePoint at tenant level


SharePoint Online provides various social features in modern experience SharePoint sites. One of the features available for SharePoint site pages is the social bar (Like, No. of Comments, Views, Save for later), which is situated at the bottom of site pages. Social bar allows users to engage with page content by liking and saving pages for later reference. Social bar also shows the number of page views and comments on modern site pages.

However, organizations may have specific requirements that necessitate enabling or disabling the social bar on SharePoint site pages. Unfortunately, there are no settings available for enabling/disabling social bar using SharePoint user interface. In this blog post, we will explore how to achieve this at SharePoint tenant level using SharePoint Online PowerShell, PnP PowerShell and CLI for Microsoft 365 scripts.

Using SharePoint Online PowerShell

Use below SharePoint Online PowerShell script to enable or disable the social bar from site pages for all SharePoint sites in the tenant:

# SharePoint online admin center URL

$adminCenterUrl = "https://contoso-admin.sharepoint.com/"


# Connect to SharePoint online admin center

Connect-SPOService -Url $adminCenterUrl


# Disable the social bar from SharePoint online site pages

Set-SPOTenant -SocialBarOnSitePagesDisabled $true


# Enable the social bar on SharePoint online site pages

Set-SPOTenant -SocialBarOnSitePagesDisabled $false

Using PnP PowerShell

You can use below PnP PowerShell script to show or hide the social bar from SharePoint online modern experience site pages:

# SharePoint online admin center URL

$adminCenterUrl = "https://contoso-admin.sharepoint.com/"


# Connect to SharePoint online admin center

Connect-PnPOnline -Url $adminCenterUrl -Interactive


# Show the social bar on SharePoint online modern site pages

Set-PnPTenant -SocialBarOnSitePagesDisabled $false


# Hide the social bar from SharePoint online modern site pages

Set-PnPTenant -SocialBarOnSitePagesDisabled $true


Using CLI for Microsoft 365

Use below CLI for Microsoft 365 script to enable or disable the Social Bar (like, No. of comments, views, Save for later) in SharePoint online at tenant level:

# Get Credentials to connect

$m365Status = m365 status

if ($m365Status -match "Logged Out") {

    m365 login

}


# Disable the social bar from SharePoint online site pages

m365 spo tenant settings set --SocialBarOnSitePagesDisabled true


# Enable the social bar on SharePoint online site pages

m365 spo tenant settings set --SocialBarOnSitePagesDisabled false


Conclusion

Enabling or disabling the social bar on site pages in SharePoint Online can be achieved using SharePoint Online PowerShell, PnP PowerShell or CLI for Microsoft 365 scripts. By following the steps outlined in this blog post, you can customize the user experience and align it with your organization’s specific requirements. Whether you want to encourage user engagement or disable social features for certain scenarios, these PowerShell scripts provide the flexibility to control the social bar’s presence on SharePoint online modern site pages.

Comments

Popular posts from this blog

Get App Expiry Dates using Powershell

Step 1: Connect-MsolService Step 2: $applist = Get-MsolServicePrincipal -all  |Where-Object -FilterScript { ($_.DisplayName -notlike "*Microsoft*") -and ($_.DisplayName -notlike "autohost*") -and  ($_.ServicePrincipalNames -notlike "*localhost*") } Step 3: foreach ($appentry in $applist) {     $principalId = $appentry.AppPrincipalId     $principalName = $appentry.DisplayName     Get-MsolServicePrincipalCredential -AppPrincipalId $principalId -ReturnKeyValues $false | ? { $_.Type -eq "Password" } | % { "$principalName;$principalId;" + $_.KeyId.ToString() +";" + $_.StartDate.ToString() + ";" + $_.EndDate.ToString() } | out-file -FilePath d:\appsec.txt -append }

Bulk Import Excel Data to SharePoint List Using PowerShell and PnP

  Managing large datasets in SharePoint can be tricky, especially when you're dealing with Excel files and need to avoid list view threshold issues. In this guide, I’ll walk you through a PowerShell script that efficiently imports data from Excel into a SharePoint Online list using PnP PowerShell — with batching support for performance. Prerequisites Make sure you have the following before running the script: SharePoint Online site URL Excel file with data properly formatted PnP PowerShell module installed ( Install-Module PnP.PowerShell ) Appropriate SharePoint permissions What the Script Does Connects to your SharePoint site Loads and reads an Excel file Converts Excel date values Batches records in groups (to avoid the 5000 item threshold) Adds the items to your SharePoint list or library Logs execution time PowerShell Script $siteUrl = "[Site Collection URL]" Connect-PnPOnline -Url $siteUrl -UseWebLogin # Capture the start time $startTime...

๐Ÿš€ Essential SPFx (SharePoint Framework) Commands for Every Developer

Whether you're new to SharePoint Framework (SPFx) or a seasoned pro, having a go-to list of core commands can significantly improve your development workflow. In this post, we'll walk through the most important SPFx CLI commands—from setting up your environment to packaging and deploying your solution. ๐Ÿ› ️ Setting Up Your SPFx Project Start by scaffolding a new project using the Yeoman generator provided by Microsoft. Make sure Node.js and npm are installed before you proceed. yo @microsoft/sharepoint After scaffolding the project, install all dependencies: npm install To update dependencies later: npm update ๐Ÿ” Trusting the Development Certificate If you're using the local workbench, you need to trust the developer certificate for HTTPS support: gulp trust-dev-cert ๐Ÿงช Running the Local Workbench To build and serve your project locally, use: gulp serve This command starts a local server at: https://localhost:4321/temp/workbench.html You can also test your solution in ShareP...