Repository navigation
az storage container list failure #33671
Copy link
Copy link
Closed
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamStorageaz storageaz storageact-codegen-extensibility-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Milestone
Description
This is autogenerated. Please review and update as needed.
Describe the bug
az storage container list
does not return
az version
{
"azure-cli": "2.87.0",
"azure-cli-core": "2.87.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"account": "0.2.5",
"log-analytics": "1.0.0b1",
"resource-graph": "2.1.1",
"ssh": "2.0.9"
}
}
Errors:
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x1049a6ac0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/petercharles/.azure/commands/2026-06-29.09-44-23.storage_container_list.89472.log'.
az_command_data_logger: command args: storage container list --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x1049e4180>]
cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/core/profiles/_shared.py", line 437, in _get_attr
op = import_module(full_mod_path)
File "/opt/homebrew/Cellar/python@3.13/3.13.14/Frameworks/Python.framework/Versions/3.13/lib/python3.13/importlib/__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1395, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1395, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'azure.mgmt.storage.blob'
cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/core/profiles/_shared.py", line 437, in _get_attr
op = import_module(full_mod_path)
File "/opt/homebrew/Cellar/python@3.13/3.13.14/Frameworks/Python.framework/Versions/3.13/lib/python3.13/importlib/__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1395, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'azure.mgmt.storage.file'
cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/core/profiles/_shared.py", line 437, in _get_attr
op = import_module(full_mod_path)
File "/opt/homebrew/Cellar/python@3.13/3.13.14/Frameworks/Python.framework/Versions/3.13/lib/python3.13/importlib/__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1395, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1395, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'azure.mgmt.storage.file'
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x1049e47c0>, <function register_global_policy_argument.<locals>.add_global_policy_argument at 0x1049e4900>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x1049e49a0>, <function register_upcoming_breaking_change_info.<locals>.update_breaking_change_info at 0x1049e4a40>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x102f23240>, <function CLIQuery.handle_query_parameter at 0x102f596c0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x1049e4860>]
cli.azure.cli.command_modules.storage._validators: Try to get storage auth_mode value from environment variables or config file.
cli.azure.cli.command_modules.storage._validators: Try to get storage account value from environment variables or config file.
cli.azure.cli.command_modules.storage._validators: Try to get storage account_url value from environment variables or config file.
cli.azure.cli.command_modules.storage._validators: Try to get storage connection_string value from environment variables or config file.
cli.azure.cli.command_modules.storage._validators: Try to get storage account value from environment variables or config file.
cli.azure.cli.command_modules.storage._validators: Try to get storage account_url value from environment variables or config file.
cli.azure.cli.command_modules.storage._validators: Try to get storage key value from environment variables or config file.
cli.azure.cli.command_modules.storage._validators: Try to get storage sas_token value from environment variables or config file.
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 677, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 820, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 812, in _run_job
return cmd_copy.exception_handler(ex)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/command_modules/storage/__init__.py", line 357, in new_handler
first(ex)
~~~~~^^^^
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/command_modules/storage/__init__.py", line 356, in new_handler
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 789, in _run_job
result = cmd_copy(params)
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 335, in __call__
return self.handler(*args, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/core/commands/command_operation.py", line 111, in handler
client = self.client_factory(self.cli_ctx, command_args) if self.client_factory else None
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 143, in cf_blob_service
account_url = get_account_url(cli_ctx, account_name=account_name, service='blob')
File "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 109, in get_account_url
raise CLIError("Please provide storage account name or connection string.")
knack.util.CLIError: Please provide storage account name or connection string.
cli.azure.cli.core.azclierror: Please provide storage account name or connection string.
az_command_data_logger: Please provide storage account name or connection string.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x1049a6d40>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 0.497 seconds (init: 0.066, invoke: 0.431)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 4175 in cache file under /Users/petercharles/.azure/telemetry/20260629094424188
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/bin/python /opt/homebrew/Cellar/azure-cli/2.87.0/libexec/lib/python3.13/site-packages/azure/cli/telemetry/__init__.py /Users/petercharles/.azure /Users/petercharles/.azure/telemetry/20260629094424188"
telemetry.process: Return from creating process 89478
telemetry.main: Finish creating telemetry upload process.
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Put any pre-requisite steps here...
az storage container list --account-name {} --auth-mode {}
Expected Behavior
Environment Summary
macOS-14.6.1-arm64-arm-64bit-Mach-O, Darwin 23.6.0
Python 3.13.14
Installer: HOMEBREW
azure-cli 2.87.0
Extensions:
account 0.2.5
log-analytics 1.0.0b1
resource-graph 2.1.1
ssh 2.0.9
Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0
Additional Context
Reactions are currently unavailable
Metadata
Metadata
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamStorageaz storageaz storageact-codegen-extensibility-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Activity
yonzhan commentedon Jun 29, 2026
Thank you for opening this issue, we will look into it.
x-engineering-agent commentedon Jul 15, 2026
Bug Analysis
az storage container listfails with:This happens during SDK profile resolution in
azure/cli/core/profiles/_shared.py(_get_attr), which tries to import operation modules for the storage management SDK (azure.mgmt.storage.blob/azure.mgmt.storage.file) that don't exist in the installedazure-mgmt-storageversion. This points to a stale or incorrect module path/profile mapping for thestoragecommand module (likely inazure/cli/core/profiles/_shared.pyor the storage command module's client factory / SDK utils), causing it to reference submodules that were removed or restructured in a newerazure-mgmt-storagerelease.az storage container listModuleNotFoundErrorduring command table/profile initialization before performing the actual list operation.Please investigate the SDK profile mapping used by the
storagemodule (azure.cli.command_modules.storage) andazure.cli.core.profiles._sharedto ensure it references valid submodules in the currently pinnedazure-mgmt-storageversion, and add/adjust a regression test undersrc/azure-cli/azure/cli/command_modules/storage/tests/coveringaz storage container list.Use this EXACT PR title:
[Storage] Fix #33671: \az storage container list`: fix ModuleNotFoundError for azure.mgmt.storage.blob/file`PR title & description format (required)
This repo enforces a PR format (guide). Please author the PR exactly as follows or CI's Check the Format of Pull Request Title and Content will fail.
Use this EXACT PR title (copy verbatim, do not reword):
Keep the backticks around the command and the
Fix #33671:prefix. You may only adjust the wording after the command (the final summary) if the fix changes; the[Storage]prefix, issue link, and backticked command must stay.Description — follow the PR template and fill in:
Fixes #33671.az storage container listcommand this affects.[Storage] `az storage container list`: <note>.Posted by agent-assist (autonomous bug-fix pipeline).
microsoft-github-policy-service commentedon Jul 15, 2026
🔔 Routing this issue to @Azure/act-codegen-extensibility-squad.
az storage blob uploaddoes not allow for uploading empty blob with--data#31852az storage blob uploaddoes not allow for uploading empty blob with--data#31852[Storage] Fix Azure#33671: `az storage container list`: Doesn't retur…