Forum Discussion
Zer0cool114
Jan 16, 2025Copper Contributor
how can we give access to specific folder only within blob in azure storage account container
I am trying to grant access to specific folder and its contents within a blob in a container. I have tried using ACL and SAS URLs but it gives access to whole container.
balasubramanim
Jan 21, 2025Iron Contributor
To grant access to a specific folder in an Azure Storage container:
Use SAS Tokens:
Generate a SAS token scoped to the folder prefix (e.g., myfolder/).
Example: Use Azure CLI to set the --name "myfolder/*" parameter.
Stored Access Policy:
Attach a stored access policy to the container and generate a SAS token linked to it.
Azure RBAC:
Enable Azure AD and assign roles (e.g., Storage Blob Data Reader) to the folder path (mycontainer/myfolder/).
These methods limit access to the folder and its contents.