SharePoint Online: How to Disable Social Bar (Like, Comment, Views, Save for later) in Modern Site Pages?

Requirement: Disable Social Bar links (Like, Comment, Views, Save for later) in SharePoint Online Modern Site Pages.

The Social Bar is a new feature in SharePoint Online modern pages that lets users like, comment, and see the number of views. Run this PowerShell script in SharePoint Online Management Shell to disable the social bar. Make sure you set the parameters accordingly.

#Set Parameters
$AdminCenterURL="https://crescent-admin.sharepoint.com"
$SiteURL = "https://crescent.sharepoint.com/sites/marketing"

#Connect to SharePoint Online
Connect-SPOService -Url $AdminCenterURL -Credential (Get-Credential)

#Disable Social Bar on Site Pages
Set-SPOSite -Identity $SiteURL -SocialBarOnSitePagesDisabled $True

Similarly, To disable the SharePoint Online Social bar at the Tenant level, use the following:

Set-SPOTenant -SocialBarOnSitePagesDisabled $true

Before:

sharepoint online disable social bar

After:

sharepoint online hide social bar

Here is another post on disabling comments on Modern pages in SharePoint Online: SharePoint Online: Disable Page Comments in Modern Sites using PowerShell

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

8 thoughts on “SharePoint Online: How to Disable Social Bar (Like, Comment, Views, Save for later) in Modern Site Pages?

  • If you need to use modern authentication (365 popup) this works instead:

    #Set Parameters
    $AdminCenterURL=”https://yourtenant-admin.sharepoint.com”
    $SiteURL = “https://yourtenant.sharepoint.com/sites/yoursite”

    #Connect to SharePoint Online
    Connect-SPOService -Credential $creds -Url https://yourtenant-admin.sharepoint.com -ModernAuth $true -AuthenticationUrl https://login.microsoftonline.com/organizations

    #Disable Social Bar on Site Pages
    Set-SPOSite -Identity $SiteURL -SocialBarOnSitePagesDisabled $True

    Reply
  • How do you get to SharePoint Online Management Shell??? Do you need to be a SharePoint admin or just the site admin? What access privliges does one need to access the management shell? Consider making the “SharePoint Online Management Shell” text a hyperlink to guide users who are new to SharePoint?

    Reply
  • Can you do it for one specific page only?

    Reply
  • cmdlet Get-Credential at command pipeline position 1
    Supply values for the following parameters:
    Connect-SPOService : The ‘Connect-SPOService’ command was found in the module
    ‘Microsoft.Online.SharePoint.PowerShell’, but the module could not be loaded. For more
    information, run ‘Import-Module Microsoft.Online.SharePoint.PowerShell’.
    At line:6 char:1
    + Connect-SPOService -Url $AdminCenterURL -Credential (Get-Credential)
    + ~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Connect-SPOService:String) [], CommandNotFoun
    dException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

    Set-SPOSite : The ‘Set-SPOSite’ command was found in the module
    ‘Microsoft.Online.SharePoint.PowerShell’, but the module could not be loaded. For more
    information, run ‘Import-Module Microsoft.Online.SharePoint.PowerShell’.
    At line:9 char:1
    + Set-SPOSite -Identity $SiteURL -SocialBarOnSitePagesDisabled $True
    + ~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Set-SPOSite:String) [], CommandNotFoundExcept
    ion
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

    Reply
    • Try re-installing SharePoint Online Management Shell “Install-Module Microsoft.Online.SharePoint.PowerShell -force” and use: Import-Module Microsoft.Online.SharePoint.PowerShell

      Reply
  • Thank you, exactly what I was looking for.

    Reply

Leave a Reply

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