az resource list is broken
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
## Describe the bug
`az resource list` (among other list commands like `az functionapp list`) do not return all the resources.
**Command Name**
`az resource list`
## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- `az resource list -g {}`
I have no idea how to cause this, some groups list fine, others do not. I looked at the --debug and tries the api call myself with `az rest` and that returns all the resources, so something is getting lost from the response from the api and the output.
I verified also this behavior is local and in Azure Shell. Using Azure PowerShell the Get-AzResource lists all resources as expeceted.
## Expected Behavior
So me the resources actually in the resource group.
## Environment Summary
```
Windows-10-10.0.22621-SP0
Python 3.10.5
Installer: MSI
azure-cli 2.40.0
Extensions:
application-insights 0.1.16
azure-devops 0.25.0
log-analytics-solution 0.1.1
resource-graph 2.1.0
Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
```
## Additional Context
Example output I captured:
```
❯ Get-AzResource -ResourceGroupName app-thing-test | ft Name,ResourceType,Kind,Location
Name ResourceType Kind Location
---- ------------ ---- --------
company-app-thing-test-eastus2 Microsoft.Cdn/profiles frontdoor global
company-app-thing-test-eastus2/company-app-thing-test-eastus2 Microsoft.Cdn/profiles/afdendpoints global
company-app-thing-test-eastus2 Microsoft.EventGrid/domains eastus2
company-app-thing-test-eastus2 Microsoft.Insights/components web eastus2
company-app-thing-test-eastus2 Microsoft.ManagedIdentity/userAssignedIdentities eastus2
company-app-thing-test-eastus2 Microsoft.OperationalInsights/workspaces eastus2
h1234567g2g Microsoft.Storage/storageAccounts StorageV2 eastus2
appthingteststg Microsoft.Storage/storageAccounts StorageV2 eastus2
z1234567u7w Microsoft.Storage/storageAccounts StorageV2 centralus
company-app-thing-test-centralus Microsoft.Web/serverFarms functionapp centralus
company-app-thing-test-eastus2 Microsoft.Web/serverFarms functionapp eastus2
company-app-thing-test-centralus Microsoft.Web/sites functionapp,linux centralus
company-app-thing-test-eastus2 Microsoft.Web/sites functionapp,linux eastus2
❯ az resource list -g app-thing-test | convertfrom-json | ft name,kind,type,location
name kind type location
---- ---- ---- --------
company-app-thing-test-eastus2 frontdoor Microsoft.Cdn/profiles global
company-app-thing-test-eastus2/company-app-thing-test-eastus2 Microsoft.Cdn/profiles/afdendpoints global
company-app-thing-test-eastus2 Microsoft.EventGrid/domains eastus2
company-app-thing-test-eastus2 Microsoft.OperationalInsights/workspaces eastus2
h1234567g2g StorageV2 Microsoft.Storage/storageAccounts eastus2
z1234567u7w StorageV2 Microsoft.Storage/storageAccounts centralus
company-app-thing-test-eastus2 functionapp Microsoft.Web/serverFarms eastus2
company-app-thing-test-eastus2 functionapp,linux Microsoft.Web/sites eastus2
```
Contributor guide
Assessment
This issue has not been assessed yet.