How to really hide lists from all site content using a script made by DFFS creator Alexander Bautz.
Hiding lists using any of the methods I’ve seen on the Internet before isn’t going to work for those “smarter” users where they can actually access all of them via PowerApps or PowerAutomate where those lists simply appear as an option.
The solution described here, hides them from everywhere. If someone does manage to get a link to the list, you simply create a view that shows nothing and prevent users from creating views by only giving them Contribute access level to your lists. The solution built by Alexander Bautz takes this issue to the next level. I use it and those lists are even hidden from me (global admin) and to overcome this, you can either copy the list List Name and use it in PowerAutomate flows or in PowerApps.
You can use both, the GUID and the list name in PowerAutomate and Power Apps.
I realised recently that users with PowerAutomate or PowerApps licenses are actually able to see all of the data. Shane Young has a similar approach in the video he posted in August 2021 but you have to build a flow for each list. This solution again is easier because all your lists are listed on the classing SharePoint page where all you need to embed the script. This is what it looks like, as soon as you tick the box, that’s it, the list is no longer visible. You can also use it to unhide some system lists.