To export a resource inventory in Azure, query the Resources table in Azure Resource Graph across your subscriptions and save each resource's name, type, location, SKU and tags. Resource Graph indexes changes with a short delay, so a resource created a moment ago can be missing, and it lists only what your account can read.
| Method | Best fit |
|---|---|
| PowerShell | A CSV of every resource across your enabled subscriptions, with subscription names. |
| Admin centre | A quick CSV of the resources a filtered view shows. |
| Altivane | Recommended for monthly inventories, with counts by type and location beside the list. |
Before you start
Use an account with read access to the subscriptions, such as the Reader role: Resource Graph returns nothing for resources you can't read. Resource Graph is free to query, and Microsoft lists no licence for it.
Know what the table holds. The Resources table has most Resource Manager resource types; resource groups and subscriptions are in ResourceContainers instead. Resource Graph reads each type through its latest non-preview API, so a property you expect can be missing. The examples read and export; they change nothing. The script's finally block disconnects the account and clears its saved Azure contexts.
Option 1
Export a resource inventory with PowerShell
Install the modules once. The script queries Resource Graph across the enabled subscriptions, follows every page of results, and saves 1 row for each resource with its subscription's name.
Install-Module -Name Az.Accounts, Az.ResourceGraph -Repository PSGallery -Scope CurrentUser$ErrorActionPreference = 'Stop'
Connect-AzAccount -ErrorAction Stop
try {
$subscriptions = @(Get-AzSubscription | Where-Object State -eq 'Enabled')
if ($subscriptions.Count -eq 0) {
Write-Output 'No enabled subscriptions are available to this account.'
return
}
$names = @{}
foreach ($subscription in $subscriptions) { $names[$subscription.Id] = $subscription.Name }
$query = @(
'Resources'
'| project id, name, type, kind, resourceGroup, subscriptionId, location,'
'sku = tostring(sku.name), tags = tostring(tags)'
'| order by id asc'
) -join ' '
$rows = [System.Collections.Generic.List[object]]::new()
$skipToken = $null
do {
$arguments = @{ Query = $query; Subscription = @($subscriptions.Id); First = 1000 }
if ($skipToken) { $arguments.SkipToken = $skipToken }
$page = Search-AzGraph @arguments
foreach ($record in $page.Data) { $rows.Add($record) }
$skipToken = $page.SkipToken
} while ($skipToken)
if ($rows.Count -eq 0) {
Write-Output 'No resources were found in the enabled subscriptions.'
} else {
$rows | Sort-Object subscriptionId, resourceGroup, name | ForEach-Object {
[pscustomobject]@{
Name = $_.name
Type = $_.type
Kind = $_.kind
ResourceGroup = $_.resourceGroup
Subscription = $names[$_.subscriptionId]
Location = $_.location
Sku = $_.sku
Tags = $_.tags
ResourceId = $_.id
}
} | Export-Csv -Path './azure-resources.csv' -NoTypeInformation -Encoding utf8
Write-Output "$($rows.Count) resources saved to azure-resources.csv."
}
} finally {
Disconnect-AzAccount | Out-Null
}The CSV holds each resource's name, Azure's type name, kind, resource group, subscription, location, SKU and tags, with tags written as JSON. To keep 1 kind of resource, add '| where type =~ "microsoft. before the project line. Resource Graph paging needs id in the results, so keep it if you edit the query.
Option 2
Export All resources in the Azure portal
- Sign in to the Azure portal with an account that can read the subscriptions.
- Search for All resources and open it.
- Filter the list to the subscriptions and resource groups you need. To add columns such as tags, select Manage view > Edit columns, add them and select Save.
- Select Export to CSV and open the file in Excel.
The export follows the filters and columns on screen, so check them first. Open query opens the same view as a query in Resource Graph Explorer. This suits a quick list for 1 review; for the same file every month, use PowerShell or Altivane.
Option 3 ยท Recommended for monthly inventories
Export a resource inventory with Altivane
- Open Altivane and choose the tenant.
- Run the Azure Resources report.
- Open the Excel workbook and find Azure resources: every resource by subscription, resource group and name, with its type as the portal names it, category, location, SKU, state and tags.
- Run the Azure Resources by Type report for how many resources there are of each type and in each location.
Each row also keeps Azure's own type name and the resource ID, so it can be matched to a PowerShell export. The Azure Subscriptions and Azure Resource Groups reports list the subscriptions and resource groups the same way, with how many resources each holds. The report needs a tenant signed in with a certificate and the Reader role for Altivane on the subscriptions.
Contact usCommon questions
Why are my resource groups missing from the export?
Resource Graph keeps resource groups and subscriptions in the ResourceContainers table, not in Resources, so query that table for them. In Altivane, the Azure Resource Groups report lists them.
Why does Resource Graph Explorer stop at 55,000 rows?
Its Download as CSV is limited to 55,000 records, a platform limit that a support request can't raise. For a larger inventory, use PowerShell, which reads the results 1,000 at a time.
How do I find the resources with no tags?
The Tags column is empty for them, but a query that keeps only those is quicker. See how to find resources without tags in Azure.
Microsoft references
Technical references checked on 7 November 2026. The example scripts have been reviewed and syntax checked; they have not been run against a live tenant.