EnjoySharePoint YouTube Channel

Hide Site Settings Gear icon for users other than owners in SharePoint 2013/2016

sharepoint 2013 hide site actions for contributors

Here we will discuss how we can hide site settings or gear icon from users other than site owners in SharePoint 2013 or SharePoint 2016. There are various ways to hide site settings icon from SharePoint 2013/2016.

Get Office 365 Enterprise E3 Or Business Premium Subscription & Try out all the features

Here we will discuss trimming controls in SharePoint 2013 / SharePoint 2016 depending on logged in user. Site setting gear icon will appear only for the logged in user who is an owner or above in SharePoint 2013/2016. We will see how we can use spsecuritytrimmedcontrol in SharePoint 2013.

Hide Site setting gear icon in SharePoint 2013

In my application user want to hide the site setting gear icon/option for all the user other than site owners and above. As we all know that in SharePoint 2013 and SharePoint 2016 site settings gear icon is available for all the users. If we want to achieve this across the site, we have to implement this change in master page.

Implement SPSecurityTrimmedControl in SharePoint 2013/2016

Follow the below steps to update the master page to hide the gear icon in SharePoint 2013/2016.

  1. Open the SharePoint 2013 site using SharePoint designer 2013

    hide site setting gear icon in sharepoint 2013
    hide site setting gear icon in sharepoint 2013
  2.  Navigate to Master page part of All Files -> _catalogs
  3. Identify your custom master page and check out  in advanced mode

    remove gear icon sharepoint 2013
    remove gear icon sharepoint 2013
  4. look for <span class=”ms-siteactions-root” id=”siteactiontd” >
  5. Copy the below code and paste right above that span tag

<SharePoint:SPSecurityTrimmedControl runat=”server” Permissions=”ManageSubWebs”>

After u add this line it will like as below and ensure that you close this tag properly.

hide site settings sharepoint 2013
hide site settings sharepoint 2013

Once you are done with your changes publish the latest master page and the output will be as follows:

Logged in user is site owner:

Now if you logged into the SharePoint 2013 site as a SharePoint site owner, then you can see they can see the settings or gear icon like below:

how to hide the gear in sharepoint 2013
how to hide the gear in sharepoint 2013

Logged in user is a contributor:

Now if a user will logged in as a contributor then you can see the settings or gear icon in SharePoint 2013.

how to hide the gear in sharepoint 2016
how to hide the gear in sharepoint 2016

You can also verify the user has contribute permission to the SharePoint site.

SPSecurityTrimmedControl in SharePoint 2013/2016
SPSecurityTrimmedControl in SharePoint 2013/2016

You may like following SharePoint customization tutorials:

Here in this SharePoint customization tutorial, I have explained how to use SPSecurityTrimmedControl in SharePoint 2013/2016. How to hide site settings SharePoint 2013 or hide the gear icon in SharePoint 2013/2016. Hope this helps, happy branding in SharePoint 2013 / 2016 !!!

Check out Best Alternative to InfoPath -> Try Now
You May Also like the Following SharePoint Tutorials:

About Krishna Vandanapu

I am Krishna.Vandanapu a SharePoint architect working in IT from last 13+ years, I worked in SharePoint 2007, 2010, 2013, 2016 and Office 365. I have extensive hands on experience in customizing SharePoint sites from end to end. Expertise in SharePoint migration tools like Sharegate, Doc Ave and Metalogix. Migrated SharePoint sites from SharePoint 2007 to 2010 and 2010 to 2013 several times seamlessly. Implementing CSOM with Microsoft best practices. Spent quality time in configuring SharePoint application services like User Profile, Search, Managed Meta data services etc. Now exploring SharePoint Framework and SharePoint 2019

View all posts by Krishna Vandanapu →