is there a way in Sharepoint online to allow anyone who has access to a Sharepoint page to be able to view every single file within a folder but restrict certain users from actually viewing the files? So for example I have files inside of folder A for example:

Folder A

  • File 1.ext
  • File 2.ext
  • File 3.ext

I'd like for everyone to be able to view all 3 files inside of the folder structure, however I'd like to restrict access to file 3 and only allow certain users to view that file.

Currently if I restrict access to file 3 they will no longer see it in the document tree.

I've managed to do this when using vanity links in the "quick links" module on SP page builder when I link to a file. I'd like this same behavior to happen in my document root if possible. Please see the image below of what happens when linked to a SP file via a vanity link...

request access image

I think this is important because we have a large company with many users and I am unsure if we will grant access to every single file to all the right people. With this method users can request access. Thank you for your help.

2 Answers 2


I think you need to break the inheritance on the particular file and grant the access to set of people on that file.

Note: You can create one group and grant the permission to it on files and keep adding new users to whom you want to grant the access on files in that group.

  • Hi Ganesh, thank you for your help and answer. I'm not 100% following though? I have removed all the people that I do not want to view the file and I've added in all of the ones that I do. The problem is not with the file restriction. I am able to grant viewership and restrict viewership at my leisure. The problem lies with the document root view. If someone's privileges are removed they have no way of ever seeing the file in the file structure, thus never knowing it existed and thus not being able to request access. Perhaps I just misunderstood your answer. New SP user here. Thanks.
    – Matt
    Jan 15, 2020 at 19:56

It's by default that user cannot view the files in the folders or libraries if they don't have permissions to these files.

Get all the file links and display in the page is the workaround for this requirement.

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.