Open In App

Microsoft Azure – Get Storage Account Information using Resource Graph

Prerequisite: Introduction to Microsoft Azure 

In this article, you will get to know how you can get information about azure storage accounts using the azure resource graph queries in a faster and simple way. The user should have read access to the management group subscriptions to fetch the data.



Here, we run all the below following KQL queries in Azure Resource Graph Explorer from Azure Portal to get the results. You can also export the data by clicking on Download as CSV from the Results section. 

Azure Resource Graph query to get the information about the azure storage accounts from the select subscription or management group scope.



Query:

resources
| where type =="microsoft.storage/storageaccounts"

Output:

 

Use the below Azure Resource Graph query to get the information about the azure storage accounts from the select subscription or management group scope by Location in ascending order.

Query:

resources
| where type =="microsoft.storage
/storageaccounts"
| order by ['location'] asc

Output:

 

 

Use the below Azure Resource Graph query to find the Storage Blob’s last Enabled Time.

Query:

resources
| where type =="microsoft.storage/storageaccounts"
| project StorageAccountName=name,
BloblastEnabledTime=properties.
encryption.services.blob.lastEnabledTime

Output:

 

Use the below Azure Resource Graph query to find the Storage File last Enabled Time.

Query:

resources
| where type =="microsoft.storage/storageaccounts"
| project StorageAccountName=name,
FilelastEnabledTime=properties.
encryption.services.file.lastEnabledTime

Output:

 

Article Tags :