10
votes

I am able to restrict access to a blob container or to particular file using SAS token, But I'm not able to generate SAS token at folder level in Azure Blob Storage.

Is there a way to provide access to only a particular folder in a Azure Blob Storage. (We have many folders in a blob container, we need to provide Read access to a single folder to client)

2
because you can an unlimited number of container, you could flatten your structure folder with a naming convention (i.e. container name = folder1-folder2-folder3)Thomas

2 Answers

13
votes

Is there a way to provide access to only a particular folder in a Azure Blob Storage.

As of today, No. As you mentioned, SAS token can be used to restrict access to either an entire blob container or an individual blob. This is because a folder in blob storage is virtual and not a real folder.

0
votes

Not sure if one can do that in Storage Gen1, but in Gen2, open storage explorer->your_container->your_folder. You will see this. enter image description here

  1. Click on Manage Access.
  2. On the right side, a pane like this will open up. enter image description here
  3. Add your user. It will be added after the Mask.
  4. Select the user, tick the access and pick one or more of Read, Write and Execute.