Skip to content
Related Articles
Open in App
Not now

Related Articles

Microsoft Azure – Get Storage Account Information using Resource Graph

Improve Article
Save Article
  • Last Updated : 15 Nov, 2022
Improve Article
Save Article

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:

resources

 

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:

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:

bloabtime

 

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:

enable time

 

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!