List of storage accounts with SAS authentication enabled

Maheswaran Ramu 0 Reputation points
2023-05-16T11:47:30.7666667+00:00

What is the KQL or Az command or Powershell script to list the all SAS authentication enabled Storage accounts from all the subscriptions in my account? or any other way to get the same..

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,529 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AirGordon 7,150 Reputation points
    2023-05-16T12:06:54.2166667+00:00

    It's not possible to audit the generation of SAS tokens. Any user that has privileges to generate a SAS token, either by using the account key, or via an Azure role assignment, can do so without the knowledge of the owner of the storage account. Be careful to restrict permissions that allow users to generate SAS tokens. To prevent users from generating a SAS that is signed with the account key for blob and queue workloads, you can disallow Shared Key access to the storage account. For more information, see Prevent authorization with Shared Key.

    ref: https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview#how-a-shared-access-signature-works

    If you're concerned about a compromised SAS or have other concerns - check the Best Practice guidance : https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview#best-practices-when-using-sas


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.