Describe the bug
az network vnet list doesn't work properly, --resource-group is wrongly required.
2.87.0 - it doesn't work
$ az network vnet list
the following arguments are required: --resource-group/-g
2.86.0 - it works
$ sudo apt-get install azure-cli=2.86.0-1~noble
...
$ az network vnet list --subscription <subscription_id> --query "[?tags.\"need-that-tag\" == 'true']"
[
...<valid content>
]
Additional context:
Related command
az network vnet list
az network vnet list --subscription <subscription_id> --query ...
Errors
$ az network vnet list --subscription <subscription_id> --query "[?tags.\"need-that-tag\" == 'true']"
the following arguments are required: --resource-group/-g
Examples from command's help:
az network vnet list --query "[?contains(addressSpace.addressPrefixes, '10.0.0.0/16')]"
List virtual networks in a subscription which specify a certain address prefix.
az network vnet list
List all virtual networks in a subscription.
az network vnet list -g MyResourceGroup
List all virtual networks in a resource group.
https://aka.ms/cli_ref
Read more about the command in reference docs
Issue script & Debug output
$ az network vnet list --debug
cli.knack.cli: Command arguments: ['network', 'vnet', 'list', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x708198b068e0>, <function OutputProducer.on_global_arguments at 0x7081988bd1c0>, <function CLIQuery.on_global_arguments at 0x7081988ef380>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Using packaged command index for profile 'latest'.
cli.azure.cli.core: Found installed extension 'ssh' (azext_ssh).
cli.azure.cli.core: Blending packaged core index with local extension index.
cli.azure.cli.core: Modules found from index for 'network': ['azure.cli.command_modules.network', 'azure.cli.command_modules.privatedns']
cli.azure.cli.core: Loading command modules...
cli.azure.cli.core: Loaded command modules in parallel:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: privatedns 0.072 14 60
cli.azure.cli.core: network 0.285 121 373
cli.azure.cli.core: Total (2) 0.286 135 433
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 134 groups, 433 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : network vnet list
cli.azure.cli.core: Command table: network vnet list
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x708198639440>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/user/.azure/commands/2026-06-05.15-56-06.network_vnet_list.3416479.log'.
az_command_data_logger: command args: network vnet list --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x708198686200>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7081986868e0>, <function register_global_policy_argument.<locals>.add_global_policy_argument at 0x708198686a20>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x708198686ac0>, <function register_upcoming_breaking_change_info.<locals>.update_breaking_change_info at 0x708198686b60>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/az/lib/python3.13/argparse.py", line 1965, in _parse_known_args2
namespace, args = self._parse_known_args(args, namespace, intermixed)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.13/argparse.py", line 2262, in _parse_known_args
raise ArgumentError(None, _('the following arguments are required: %s') %
', '.join(required_actions))
argparse.ArgumentError: the following arguments are required: --resource-group/-g
cli.azure.cli.core.azclierror: the following arguments are required: --resource-group/-g
az_command_data_logger: the following arguments are required: --resource-group/-g
Examples from command's help:
az network vnet list
List all virtual networks in a subscription.
az network vnet list -g MyResourceGroup
List all virtual networks in a resource group.
az network vnet list --query "[?contains(addressSpace.addressPrefixes, '10.0.0.0/16')]"
List virtual networks in a subscription which specify a certain address prefix.
https://aka.ms/cli_ref
Read more about the command in reference docs
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7081986396c0>]
az_command_data_logger: exit code: 2
cli.__main__: Command ran in 0.349 seconds (init: 0.040, invoke: 0.309)
Expected behavior
az network vnet list works the same as in 2.86.0.
az network vnet list --query is very useful.
Environment Summary
azure-cli 2.87.0
core 2.87.0
telemetry 1.1.0
Extensions:
ssh 2.0.7
Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0
Python location '/opt/az/bin/python3'
Config directory '/home/user/.azure'
Extensions directory '/home/user/.azure/cliextensions'
Python (Linux) 3.13.13 (main, May 26 2026, 06:37:04) [GCC 13.3.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response
Describe the bug
az network vnet listdoesn't work properly,--resource-groupis wrongly required.2.87.0 - it doesn't work
2.86.0 - it works
Additional context:
az network vnet list.https://learn.microsoft.com/en-us/cli/azure/network/vnet?view=azure-cli-latest#az-network-vnet-list
Related command
az network vnet list
az network vnet list --subscription <subscription_id> --query ...
Errors
Issue script & Debug output
Expected behavior
az network vnet listworks the same as in 2.86.0.az network vnet list --queryis very useful.Environment Summary
Additional context
No response