How to Hide Share, Follow, and Sync Buttons in SharePoint 2013?

We got a requirement to remove the Share, Follow, and Sync buttons in SharePoint 2013. Let me summarize various ways to disable these buttons:
sharepoint 2013 disable share, follow, sync buttons

How to disable the “Share” button in SharePoint 2013?

Share functionality in SharePoint allows existing users of the site to invite someone to SharePoint. Once the request is made, the site owner gets notified and can choose whether to approve or reject the permission request from Site Settings, Access Requests. The share button relies on the “Access requests” configuration. To disable the “Share button” in SharePoint 2013, simply disable access requests.

  • Go to the Site Settings page of your SharePoint site.
  • Click on the “Site Permissions” link under the “Users and Permissions” group
  • Click on “Access Request Settings” in the ribbon.
  • Uncheck “Allow access request” and click on “OK” to save your changes. This should hide the Share button in SharePoint 2013.sharepoint 2013 disable share button

Remember, You will have to make this change for each site! However, the Share button will still be visible for site owners and administrators!

How to Disable Sync buttons in SharePoint 2013?

To disable sync, Navigate to  Site settings >> Click on “Search and offline availability” >> set offline client availability to “No”. There are a few more ways discussed in my another article: Hide Sync Button in SharePoint 2013

How to disable the “Follow” button in SharePoint 2013?

To disable the “Follow” button in SharePoint 2013, You’ll have to disable the “Following Content” feature. Navigate to:

  • Site Settings >> Click on “Manage Site Features”
  • Click on “Deactivate” on ” Following Content” feature
hide follow button in sharepoint

This removes the following button in SharePoint 2013. If you want to disable the “Following” feature at the Farm level, disable the “ContentFollowingStapling” hidden feature at Farm Level:

Disable-SPFeature -identity "ContentFollowingStapling"

Disable Access Request, Deactivate Features using PowerShell:

  • Share: To disable access requests on all sites using PowerShell, refer: Disable access request in SharePoint 2013
  • Following: To deactivate the “Following content” feature using PowerShell as:
    Disable-SPFeature -identity "FollowingContent" -URL "https://your-sp-site.com/" 
  • Sync: To exclude from offline client, run:
    Get-SPSite -limit all | get-SPWeb -limit all | Foreach { $_.ExcludeFromOfflineClient=1; $_.Update()} 

Remove Share, Follow, Sync buttons at Master page level:

These promoted action buttons are on the master page as follows:

Share Button:

Follow Button:

<SharePoint:DelegateControl ID="DelegateControl2" runat="server" ControlId="PromotedActions" AllowMultipleControls="true" />

Sync Button:

<SharePoint:SPSyncPromotedActionButton ID="SPSyncPromotedActionButton1" runat="server" />

To hide these controls, simply move them inside the Comment block. <!–  –>. Do not delete these controls from the Master page! You’ll end up in a crash!!

CSS to hide Share, Follow and Sync Buttons:

Let’s hide them based on their IDs. You can place this CSS code with the “Script Editor” web part or place it on the Master page.

  • Sync button’s id: ctl00_SyncPromotedAction
  • Follow button id: site_follow_button
  • Share button’s id:  ctl00_site_share_button
<style type="text/css">

a[id$=site_share_button], a[id$=SyncPromotedAction], a#site_follow_button
{
    display: none !important;
}
</style>

This hides Share button from promoted actions section. But share button is present in ECB/Callout menu and in list view quick control also. To hide them all as well, use selectors:  a[id$=”site_share_button”], a.ms-calloutLink[title=”Share”], button.js-listview-qcbShareButton.

How to hide all buttons (Share, Follow, Sync, Edit, Full Screen)?

<style type="text/css"> 
#RibbonContainer-TabRowRight { display: none !important;}
</style>

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

7 thoughts on “How to Hide Share, Follow, and Sync Buttons in SharePoint 2013?

  • I am new to share point so I didnt know how to disable but thanks to your article which increased my knowledge and sort out my problem.

    Reply
  • i am following the documents from one of the sharepoint site document library
    the follwed document entry is added in my side one drive loaction. and each time its sync with recent updae of the document.
    my quetion is, i delted the document from source library, but still refernce entry is availanbe in ondrive site.
    once i cleick the entry, i am getting file not found error.

    How to removed the deleted items entry in “Docs I’m following ” page by default ?

    Reply
  • Is it possible to hide that entire ribbon for all users?

    Reply
    • Yes, you can edit your master CSS file (COREV15.css). You will need to add the display:none !important; to div.ms-cui-TabRowRight.

      div.ms-cui-TabRowRight{
      padding-right:5px;
      height:35px;
      line-height:35px;
      display:none !important;
      }

      Reply
  • How to UNHIDE EDIT tab in this ribbon, i am an administrator having full control but cannot see this EDIT tab ( I am not an IT expert )

    Reply
  • I’ve tried to hide the Share buttons around the page by using your CSS tip. But notting gets hidden. Tried putting css in the page, in the master-page and linking a css-file from the masterpage.Any clue on what’s wrong?

    Reply
  • We did it a bit differently. For us we wanted to block sharing on the MySites to prevent internal data leaks.

    If a user tries to share from their personal page they will get the following error – “Sorry, something went wrong. Only a limited set of people are allowed to share this content.”

    CSS hacks were not required for this as there is a feature that can be disabled in the central admin page.

    Central Admin > Manage Web Applications > Highlight your SharePoint – Mysites site > User Permissions

    **Uncheck** *Manage Permissions – Create and change permission levels on the Web site and assign permissions to users and groups.*

    This will prevent the users from being able to adjust the permissions themselves for files/folders on their MySite.

    Reply

Leave a Reply

Your email address will not be published.