Show or hide SharePoint list and libraries

SharePoint lists and libraries are visible to all users and there are various ways to hide them. Admin can break inheritance for the list/libraries and set permissions for a specific group of users, this will hide the list from all users except that specific group and list content will only be available if user have the permissions. But sometime we can have few list or libraries where we added some configuration information and do not want user to directly access that but the list items or documents can be shown to them through different web parts, in this scenario the break inheritance will not work and we might have to use either PowerShell or SharePoint designer (or stsadm for older versions). In this blog post I am going to share the PowerShell script to show/hide the list and libraries in SharePoint online and SharePoint on-premise and also how we can achieve this using SharePoint Designer. You can download the PowerShell script for SharePoint Online and on-premise from TechNet.

SharePoint Hide show list and libraries

Hide list and libraries in SharePoint Online

Use the below PowerShell script to show or hide the list and library from the users for SharePoint Online (Office 365). I have written a simple function.

You have to call the function ShowHideList which require three parameters.

You can easily show/hide a SharePoint List or library using above function in SharePoint Online. Download the above PowerShell script from GitHub.

Hide list and libraries in SharePoint On-premise

Use the below PowerShell script to show or hide the list and library from the users for SharePoint On-Premise (SharePoint 2010, SharePoint 2013, SharePoint 2016, SharePoint Foundation). Just like the script written in above section, I have written a PowerShell script having the same function name but for on-premise environment.

You have to call the function ShowHideList which require three parameters.

Download the above PowerShell script from GitHub.

Hide list or Library using SharePoint Designer

SharePoint Designer is a very useful tool when you need to do some customizations, if you do not have development expertise to execute any PowerShell Script then you can easily do it using SharePoint Designer.

Open the site in SharePoint designer and click on Lists and Libraries from left panel. This will show all the list and libraries in current particular site.

SharePoint Hide show list and libraries - SPD

Click on the list or library which you want to show or hide from the browser or view site content. In the settings section, click on the “Hide from Browser” under General. Save the changes and refresh site in browser, the list/library is now hidden from all users.

SharePoint Hide show list and libraries - SPD

Note: The above methods will only hide the list/library for browser view but user still can access it using URLs.

The following two tabs change content below.
Adnan Amin
Adnan is two time SharePoint MVP (Most Valuable Professional) with over 12 years of extensive experience with major expertise on SharePoint Server, Office 365, .Net Platform and Microsoft BI. He is currently working SharePoint Architect at FMT Consultants. He is MCT Regional Lead for Pakistan Chapter since 2012. He is working on SharePoint for past nine years and worked on different intranet/intranet solutions for private & govt. sector majorly in Gulf region, which include OOB and customized solutions. He is a trainer, technology evangelist and also speaks in community forums.

Leave a Reply

Your email address will not be published. Required fields are marked *