Sometimes when building some internal processes to organizations, it’s possible that it is required to create a SharePoint list. However, sometimes it can create confusion for the end-user that sees the list there. So we can hide that list from the SharePoint site to avoid this. Everything will work as normal on the list and it’ll be accessible via URL. This scenario can be used as well when you’re building a new list using List Formatting and you don’t want the list to be available just yet. This is possible to be done in a SharePoint with a few steps. We’ll use the PNP Powershell and Office 365 CLI to demonstrate.
If you intend to have the list back to Visible, you just need to make the value of hidden false. NOTE: If you have any PowerAutomated app, these hidden lists will not appear in the dropdown but if you use the custom property and add there the name it will work.
To install the PnP PowerShell you can follow the steps in this article. After that switch the variables on the code to your scenario.
$listName = "LIST NAME" $site = "https://CONTOSO.sharepoint.com/" Connect-PnPOnline -Url $site -UseWebLogin Set-PnPList -Identity $listName -Hidden $true
To install the Office 365 CLI you can follow the steps in this article. After that switch the variables on the code to your scenario.
Office 365 CLI
$listName = "LIST NAME" $site = "https://CONTOSO.sharepoint.com/" o365 login $list = o365 spo list get --webUrl $site -t $listName -o json| ConvertFrom-Json o365 spo list set --webUrl $site -i $list.Id -t $listName --hidden true
When executing this code, the changes on the site will be done immediately. The list will keep accessible via URL and all the Processes attached to that list will work as normal. The gif below shown the two codes making the list hidden. In this first post of 2020, let me also take this opportunity to wish a good year/decade to everyone.