I am in a need to hide the Site Content option completely from site for Visitors. Can anyone help me how I can achieve this goal?

How to hide Site Content only for Visitors or a particular security group in SharePoint 2013?

  • same issue here, but in SPO Teams Site, the external user (created in my domain account but without licences) he can see the Team Group Members. :( .... is not GDPR OK because my user have phone nr. etc on there profile. :(((
    – Petrix
    Dec 17, 2018 at 16:08
  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
    – MHeld
    Dec 17, 2018 at 17:54
  • How do I hide site contents for visitors but still allow them to complete the InfoPath form published on the same page? Oct 1, 2019 at 11:43

5 Answers 5


You have two possibilities in this case that doesn't require code.

Variant 1) Change the permission level of visitor When you change the permission level from "Read" to "Restricted Read" your user won't see the site contents anymore

Variant 2) Alternate read permission level of visitors You can simply remove the base permission "View Application Pages" from the "Read" Permission level.

The "site contents" is not the only place where user will see this navigation option. It is also available through the gear icon on the suite bar. By changing the permissions or permission level it will be hidden from there too.

  • 2
    That's what I needed. Particularly the second choice worked. I created custom permission level similar to Read and removed "View Application Page" . Option is restricting users to run JQuery. Dec 9, 2015 at 8:40

You'd have to remove it from 2 places, the Quick Launch and the Site Actions menu. You can use JQuery and SPServices to check group membership and hide the link in the Quick Launch. Put the code in your master page(s), not a Content Editor Web Part, to hide it on the entire site. You can also use JQuery to hide "View All Site Content" from the Site Actions menu.

However, you will not be able to prevent users from typing /_layouts/viewlsts.aspx directly into the address bar. Clicking the default "Lists" or "Libraries" headers in the Quick Launch would also take them to the content page. It might be possible to add JQuery to the system master page to redirect visitors to a different page if the URL includes /_layouts/viewlsts.aspx.

  • Create a separate SharePoint Group (or Audience in Central Admin)
  • Check Group Membership with:
  • CEWP (on every needed page); (audience) targeted to this group
  • or with Code in your MasterPage
  • Apply CSS to alter UI
  • inside CEWP
  • append CSS from MasterPage

Usually your visitors won't go to many pages, so the CEWP option works fine.

Note: If they know the URL they can go where they have rights

So it is kind of pointless to hide it; they should only see what they are allowed to see inside "Site Contents"


What you do usually when you have an internet publishing site is to include a SPSecurityTrimmedControl on your masterpage, to restrict the real visibility of the control (here the quicklaunch) for different users.

An other solution is to restrict the link directly on the link itself. When you see the control in the masterpage, you have properties like PermissionsString="ViewFormPages".

The control for the link in the masterpage (seattle.master)

                            CssClass="ms-core-listMenu-item ms-core-listMenu-heading" />

You can change the permissionstring to "ManageWeb" to restrict the link to the admin.

For both solution, you should update the masterpage, with SP Designer e.g


ps : Don't forget to NOT update standard masterpage but make a copy before and work on this copy :)

  • I just wanted to hide it from Visitors. Rest users who have contribute permission should be able to see the Site content Option. Dec 4, 2015 at 11:19
  • You can choose the appropriate permission for your site and who will see the Site content option. I said ManageWeb because it's the common one. But there are other options. See here : social.msdn.microsoft.com/Forums/sharepoint/en-US/… Dec 4, 2015 at 13:36
  • You'll still need to find a way to hide the Site Actions option.
    – Erin L
    Dec 5, 2015 at 15:49

SharePoint Online doesn't handle the permissions at the same way as SharePoint 2013.

Use this:

<SharePoint:SPSecurityTrimmedControl runat="server" Permissions="AddListItems" 
    PermissionContext="CurrentItem" PermissionMode="Any">
    <SharePoint:MenuItemTemplate runat="server" id="MenuItem_ViewAllSiteContents"
        PermissionMode="Any" />

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.