Hide Site Setting Gear icon for users other than owners in SharePoint 2013 or SharePoint 2016

sharepoint 2013 hide site actions for contributors
InfoPath alternatives for form designing SharePoint

In this article we will be learning about trimming controls in SharePoint 2013 / SharePoint 2016 depending on logged in user. Site setting gear icon will appear only for the logged in user is owner or above. We will see how we can use spsecuritytrimmedcontrol in sharepoint 2013.

Objective :: Hide site setting gear option

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.

Solution :: Implement SPSecurityTrimmedControl

Follow the below steps to update the master page to hide the gear icon.


  1. Open the SharePoint site in 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 actions menu based on user permissions
hide site actions menu based on user permissions

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:

sharepoint 2013 master page branding
sharepoint 2013 master page branding

Logged in user is contributor:

sharepoint 2013 hide site actions for contributors
sharepoint 2013 hide site actions for contributors
sharepoint 2013 master page customization
sharepoint 2013 master page customization

Hope this helps, happy branding in SharePoint 2013 / 2016 !!!


You May Also like the Following SharePoint Online Tutorials:

About Krishna Vandanapu

I am Krishna.Vandanapu a SharePoint architect working in IT from last 12 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 →

Leave a Reply