Welcome to Microsoft Q&A, thanks for posting your query.
Public access and anonymous access are related concepts in Azure Storage, but they have distinct meanings:
- Public Access: This refers to the ability to access data in a storage account without needing authorization. When public access is enabled for a container, it can be set to allow public read access for blobs only or for both the container and its blobs. This means that users can access the blobs without needing to authenticate, depending on the configuration.
- Anonymous Access: This is a specific type of public access where users can access data without any form of authentication or authorization. In Azure Storage, anonymous access is typically disabled by default, and it must be explicitly enabled at both the storage account and container levels.
When a container is configured for anonymous access, any client can read data in that container. Anonymous access presents a potential security risk, so if your scenario does not require it, we recommend that you remediate anonymous access for the storage account.
The Modify-SABlobPublicAccess
command is used to change the public access level of a storage account. If anonymous access is allowed, this command can set the access level to allow public read access for blobs or for the entire container. However, if anonymous access is disallowed, the command will not permit any public access to the blobs or containers.
while both public and anonymous access involve accessing data without authorization, public access can be configured to allow certain levels of access, whereas anonymous access specifically refers to access without any authentication. In simple terms, the difference between public and anonymous access is that public access allows anyone to access the container or blob, while anonymous access requires users to have valid Azure credentials to access the container or blob.
Remediate anonymous read access to blob data (Azure Resource Manager deployments) - Azure Storage | Microsoft Learn
https://learn.microsoft.com/en-us/azure/storage/blobs/anonymous-read-access-configure?tabs=portal#about-anonymous-read-access
Hope the above answer helps! Please let us know do you have any further queries.
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.