Skip to content
Related Articles
Open in App
Not now

Related Articles

Microsoft Azure – Export the List of Azure Storage Services using KQL

Improve Article
Save Article
  • Last Updated : 27 Jan, 2023
Improve Article
Save Article

Pre-requisite: Azure

In this article, we will show you how to export the information of Azure Storage Services by using KQL (Kusto Query Language) resource graph query to retrieve within a subscription in simple and easy steps. We will be using Azure native service called Azure Resource Graph Explorer to retrieve the information. To retrieve the information one should require RBAC read access on the select or multiple Azure subscriptions.

Steps to Export the List of Azure Storage Services

Step 1: Log in to Azure Portal

Step 2: Open or Access the Azure Resource Graph Explorer

Step 3: To get the Azure Storage Services >> use the following KQL (Kusto Query Language) query to retrieve information about Azure Storage Services in a subscription. (Refer to Sample Output)

| where type in~("Microsoft.Storage/storageAccounts",
| project name, type, subscriptionId

This query will return the name, type, and subscription ID of the Azure Storage Services.

Note: In the above query you can modify it to get the information you need by adding or removing columns and filters.

metadata of Azure Storage Services.


Step 4:  Now click on Download as CSV to export the information to a CSV file.

download the csv file


Bonus Examples: To get the count or to verify the count use the following KQL query.

| where type has ""
| extend Type = tostring(type)
| parse Type with ResourceType"/"ServiceName
| summarize Resource_Count=count() by ResourceType, ServiceName

This query will return the service name and total count of resources.



My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!