Can a blob in a public Azure container be accessed only via SAS token?

Ameen 0 Reputation points
2025-01-10T18:05:45.6933333+00:00

I have a public container, and I want certain blobs to be accessible only through a SAS token. Even after generating a SAS token, the blob remains accessible via the public URL.

Is it possible to restrict access to just the SAS token while keeping the container public?

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,020 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Marcin Policht 31,315 Reputation points MVP
    2025-01-10T18:19:05.4333333+00:00

    In short, no. Access level is set on the container level and it applies to all blobs within in


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

  2. Keshavulu Dasari 2,835 Reputation points Microsoft Vendor
    2025-01-10T19:52:08.4733333+00:00

    Hi Ameen ,

    Greetings & Welcome to Microsoft Q&A forum! Thanks for posting your query!

    Adding more information to the above response!

    In Azure Blob Storage, access policies are applied at the container level, not at the individual blob level. This means that if a container is set to public, all blobs within that container will inherit the public access policy and be accessible without authentication

    To restrict access to certain blobs using a SAS token while keeping the container public, you would need to move those specific blobs to a separate private container. This way, the private blobs can only be accessed using a SAS token, while the public container remains accessible without restrictions for other blobs


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members. User's image

    If you have any other questions or are still running into more issues, let me know in the "comments" and I would be happy to help you.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.