I have made a site in SharePoint 2013 and different users in my sites like who can view, visit, edit or has full control of the site.

Now for some users I want to hide the browse and page tab from the navigation bar. There are many links available but not working from me.

Can somebody give me brief technical details as to how this could be done? Moreover how can I hide settings link in my ribbon for some users?


2 Answers 2


Create a group which contains users who cant see page and browse buttons in the ribbon or vice versa,

The Below function will hide the browse and page tab from the ribbon

function HideBrowseAndPage() {
var SPGroupName = "YourGroupName";
var clientContext = new SP.ClientContext.get_current();
var currentUser = clientContext.get_web().get_currentUser();
var userGroups = currentUser.get_groups();
clientContext.executeQueryAsync(function () {
    var groupsEnumerator = userGroups.getEnumerator();
    while (groupsEnumerator.moveNext()) {
        var group = groupsEnumerator.get_current();
        if (group.get_title().toUpperCase().contains(SPGroupName)) {                
}, OnQueryFailed);
function OnQueryFailed() {}

Note: Use this code in your Master page.

  1. Create JavaScript or CSS code that hides the items from the ribbon
  2. Place that code inside Script Editor Web Part
  3. Use Audience targeting in web part properties to only "display" that web part to specific users (=to those from which you wish to hide the ribbon items)
  • 1
    This will work for a specific page right ?
    – user51831
    Commented Jun 16, 2016 at 7:13
  • Yes, this will only affect the page on which you add the SEWP.
    – Jussi Palo
    Commented Jun 16, 2016 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.