az commands always empty despite having VMs
Describe the bug
I've encountered a very strange issue where I can use az resource list to show all of my resources and it shows me a few VMs. However, when I use az vm list I always get an empty list [] returned to me regardless of the fact that there are VMs and I can access them via the web interface. I've tried specifying the resource group, running queries, and nothing seems to make a difference. I've also experienced similar issues with az network ... commands. Some commands do work like az storage account list, az account list, and az group list.
Here is a shot of az resource list with sensitive details blurred. We can see that there are multiple Microsoft.ClassicNetwork/virtualNetworks:

To Reproduce
az login
az account set --subscription <subscription_id>
az resource list
az vm list
Expected behavior
A JSON list of the VMs. One for each VM shown in the az resource list.
Environment summary Using 2.0.32 Azure CLI on Mac. I also tried on Windows and got the same result. I also tried using the Azure Cloud Shell and got the same result.
Additional context I have a contributor role, not an owner role. Not sure if this could be an issue, but based on the role permissions it seems like it should not be a factor.
Did you have default resource group defined through az configure? you can use --debug to cross check the request payload which was sent on the wire.
After digging in more and verifying that the behavior is the same even if I use Powershell, I finally found this documentation that seems to indicate that 'classic' resources can't be viewed via Powershell and, presumably, via the CLI either. https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-deployment-model
Leaving here so that someone more familiar with the CLI can validate that this is indeed the issue and then happy for it to be closed out.
Yes, @billmccord this is the case for strongly-typed commands like VM and network. They are using only the resource providers Microsoft.Compute, Microsoft.Network, Microsoft.Storage etc.
The generic resource arguments can show everything, which is why you see your ClassicX resources.
Let us know how to get the the values for VM Classic machines details in Azure CLI ?
For classic VMs, you can use CLI 1.0
i'm tried using azure cli --version 0.10.14 and getting no vm listed .
I am having this same issue with the CLI.
az account list returns my subscriptions, but no other list command returns anything. Is there a solution to fix this? I have uninstalled and reinstalled the CLI even, but I'm getting the same issue. I have owner IAM control over all these resources as well.
@mgeorgebrown89, try deleting your ~/.azure directory and run az login again. (in my case I completely re-installed the az cli, but I think only removing the .azure dir may have been sufficient.)