Skip to content

Create storage account in Azure China through OIDC gives InvalidResourceType (checkNameAvailability) #31037

@christerengman

Description

@christerengman

Describe the bug

In version 2.70.0, creating storage account as service principal authenticated through OIDC in Azure China gives the following error:

ERROR: (InvalidResourceType) The resource type 'checkNameAvailability' could not be found in the namespace 'Microsoft.Storage' for api version '2024-01-01'. The supported api-versions are '2023-05-01,2023-04-01,2023-01-01,2022-09-01,2022-05-01,2021-09-01,2021-08-01,2021-06-01,2021-05-01,2021-04-01,2021-02-01,2021-01-01,2020-08-01-preview,2019-06-01,2019-04-01,2018-11-01,2018-07-01,2018-03-01-preview,2018-02-01,2017-10-01,2017-06-01,2016-12-01,2016-07-01,2016-05-01,2016-01-01,2015-06-15,2015-05-01-preview'.

Related command

az storage account create

Errors

ERROR: (InvalidResourceType) The resource type 'checkNameAvailability' could not be found in the namespace 'Microsoft.Storage' for api version '2024-01-01'. The supported api-versions are '2023-05-01,2023-04-01,2023-01-01,2022-09-01,2022-05-01,2021-09-01,2021-08-01,2021-06-01,2021-05-01,2021-04-01,2021-02-01,2021-01-01,2020-08-01-preview,2019-06-01,2019-04-01,2018-11-01,2018-07-01,2018-03-01-preview,2018-02-01,2017-10-01,2017-06-01,2016-12-01,2016-07-01,2016-05-01,2016-01-01,2015-06-15,2015-05-01-preview'.
Code: InvalidResourceType
Message: The resource type 'checkNameAvailability' could not be found in the namespace 'Microsoft.Storage' for api version '2024-01-01'. The supported api-versions are '2023-05-01,2023-04-01,2023-01-01,2022-09-01,2022-05-01,2021-09-01,2021-08-01,2021-06-01,2021-05-01,2021-04-01,2021-02-01,2021-01-01,2020-08-01-preview,2019-06-01,2019-04-01,2018-11-01,2018-07-01,2018-03-01-preview,2018-02-01,2017-10-01,2017-06-01,2016-12-01,2016-07-01,2016-05-01,2016-01-01,2015-06-15,2015-05-01-preview'.

Issue script & Debug output

INFO: telemetry.process: Return from creating process 1862
INFO: telemetry.main: Finish creating telemetry upload process.
DEBUG: cli.knack.cli: Command arguments: ['storage', 'account', 'create', '--name', 'xxxxxxxx', '--resource-group', 'xxxxxxxx', '--location', 'chinaeast2', '--allow-blob-public-access', 'false', '--sku', 'Standard_LRS', '--min-tls-version', 'TLS1_2', '--debug']
DEBUG: cli.knack.cli: init debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7fa4148db7e0>, <function OutputProducer.on_global_arguments at 0x7fa41467e7a0>, <function CLIQuery.on_global_arguments at 0x7fa4146c3ce0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'storage': ['azure.cli.command_modules.storage']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name Load Time Groups Commands
DEBUG: cli.azure.cli.core: storage 0.169 59 275
DEBUG: cli.azure.cli.core: Total (1) 0.169 59 275
DEBUG: cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
DEBUG: cli.azure.cli.core: Loading extensions:
DEBUG: cli.azure.cli.core: Name Load Time Groups Commands Directory
DEBUG: cli.azure.cli.core: Total (0) 0.000 0 0
DEBUG: cli.azure.cli.core: Loaded 59 groups, 275 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command : storage account create
DEBUG: cli.azure.cli.core: Command table: storage account create
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fa413836fc0>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/runner/.azure/commands/2025-03-14.11-20-33.storage_account_create.1866.log'.
INFO: az_command_data_logger: command args: storage account create --name {} --resource-group {} --location {} --allow-blob-public-access {} --sku {} --min-tls-version {} --debug
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7fa413877f60>]
DEBUG: cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 657, in _get_attr
op = getattr(op, part)
^^^^^^^^^^^^^^^^^
AttributeError: module 'azure.mgmt.storage.v2024_01_01.models' has no attribute 'ActiveDirectoryPropertiesAccountType'

DEBUG: cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 657, in _get_attr
op = getattr(op, part)
^^^^^^^^^^^^^^^^^
AttributeError: module 'azure.mgmt.storage.v2024_01_01.models' has no attribute 'ListKeyExpand'

DEBUG: cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 657, in _get_attr
op = getattr(op, part)
^^^^^^^^^^^^^^^^^
AttributeError: module 'azure.mgmt.storage.v2024_01_01.models' has no attribute 'CorsRuleAllowedMethodsItem'

DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7fa4138b2340>, <function register_cache_arguments..add_cache_arguments at 0x7fa4138b2480>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7fa4138b2520>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fa41467e840>, <function CLIQuery.handle_query_parameter at 0x7fa4146c3d80>, <function register_ids_argument..parse_ids_arguments at 0x7fa4138b23e0>]
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=StorageManagementClient
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='/home/runner/.azure/service_principal_entries.json', encrypt=False
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='/home/runner/.azure/msal_token_cache.json', encrypt=False
DEBUG: cli.azure.cli.core.auth.binary_cache: load: /home/runner/.azure/msal_http_cache.bin
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
DEBUG: msal.authority: Initializing with Entra authority: https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
DEBUG: msal.authority: openid_config("https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.partner.microsoftonline.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://microsoftgraph.chinacloudapi.cn/oidc/userinfo', 'authorization_endpoint': 'https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/kerberos', 'tenant_region_scope': 'AS', 'cloud_instance_name': 'partner.microsoftonline.cn', 'cloud_graph_host_name': 'graph.chinacloudapi.cn', 'msgraph_host': 'microsoftgraph.chinacloudapi.cn', 'rbac_url': 'https://pas.chinacloudapi.cn'}
DEBUG: msal.application: Broker enabled? None
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=StorageManagementClient
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
DEBUG: msal.authority: Initializing with Entra authority: https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
DEBUG: msal.authority: openid_config("https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.partner.microsoftonline.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://microsoftgraph.chinacloudapi.cn/oidc/userinfo', 'authorization_endpoint': 'https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.chinacloudapi.cn/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/kerberos', 'tenant_region_scope': 'AS', 'cloud_instance_name': 'partner.microsoftonline.cn', 'cloud_graph_host_name': 'graph.chinacloudapi.cn', 'msgraph_host': 'microsoftgraph.chinacloudapi.cn', 'rbac_url': 'https://pas.chinacloudapi.cn'}
DEBUG: msal.application: Broker enabled? None
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.chinacloudapi.cn//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_credentials: ServicePrincipalCredential.get_token: scopes=('https://management.core.chinacloudapi.cn//.default',), kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 1c08daac-6993-458b-bd09-861689a662d6
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.chinacloudapi.cn/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Storage/checkNameAvailability?api-version=2024-01-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'POST'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Length': '67'
DEBUG: cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '580e282c-00c6-11f0-8d45-6045bd05991b'
DEBUG: cli.azure.cli.core.sdk.policies: 'CommandName': 'storage account create'
DEBUG: cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--name --resource-group --location --allow-blob-public-access --sku --min-tls-version --debug'
DEBUG: cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.70.0 (DEB) azsdk-python-core/1.31.0 Python/3.12.8 (Linux-6.8.0-1021-azure-x86_64-with-glibc2.39)'
DEBUG: cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: {"name": "xxxxxxxx", "type": "Microsoft.Storage/storageAccounts"}
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.chinacloudapi.cn:443
DEBUG: urllib3.connectionpool: https://management.chinacloudapi.cn:443 "POST /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Storage/checkNameAvailability?api-version=2024-01-01 HTTP/1.1" 404 535
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 404
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8'
DEBUG: cli.azure.cli.core.sdk.policies: 'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-failure-cause': 'gateway'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-request-id': 'c2d0ae98-9b87-4d90-bf46-a0f880132fa1'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'c2d0ae98-9b87-4d90-bf46-a0f880132fa1'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'CHINANORTH3:20250314T112035Z:c2d0ae98-9b87-4d90-bf46-a0f880132fa1'
DEBUG: cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies: 'Date': 'Fri, 14 Mar 2025 11:20:34 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Length': '535'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"error":{"code":"InvalidResourceType","message":"The resource type 'checkNameAvailability' could not be found in the namespace 'Microsoft.Storage' for api version '2024-01-01'. The supported api-versions are '2023-05-01,2023-04-01,2023-01-01,2022-09-01,2022-05-01,2021-09-01,2021-08-01,2021-06-01,2021-05-01,2021-04-01,2021-02-01,2021-01-01,2020-08-01-preview,2019-06-01,2019-04-01,2018-11-01,2018-07-01,2018-03-01-preview,2018-02-01,2017-10-01,2017-06-01,2016-12-01,2016-07-01,2016-05-01,2016-01-01,2015-06-15,2015-05-01-preview'."}}
DEBUG: cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 666, in execute
raise ex
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/storage/operations/account.py", line 91, in create_storage_account
name_is_available = scf.storage_accounts.check_name_availability(account_name_param)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 94, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/mgmt/storage/v2024_01_01/operations/_storage_accounts_operations.py", line 803, in check_name_availability
map_error(status_code=response.status_code, response=response, error_map=error_map)
File "/opt/az/lib/python3.12/site-packages/azure/core/exceptions.py", line 161, in map_error
raise error
azure.core.exceptions.ResourceNotFoundError: (InvalidResourceType) The resource type 'checkNameAvailability' could not be found in the namespace 'Microsoft.Storage' for api version '2024-01-01'. The supported api-versions are '2023-05-01,2023-04-01,2023-01-01,2022-09-01,2022-05-01,2021-09-01,2021-08-01,2021-06-01,2021-05-01,2021-04-01,2021-02-01,2021-01-01,2020-08-01-preview,2019-06-01,2019-04-01,2018-11-01,2018-07-01,2018-03-01-preview,2018-02-01,2017-10-01,2017-06-01,2016-12-01,2016-07-01,2016-05-01,2016-01-01,2015-06-15,2015-05-01-preview'.
Code: InvalidResourceType
Message: The resource type 'checkNameAvailability' could not be found in the namespace 'Microsoft.Storage' for api version '2024-01-01'. The supported api-versions are '2023-05-01,2023-04-01,2023-01-01,2022-09-01,2022-05-01,2021-09-01,2021-08-01,2021-06-01,2021-05-01,2021-04-01,2021-02-01,2021-01-01,2020-08-01-preview,2019-06-01,2019-04-01,2018-11-01,2018-07-01,2018-03-01-preview,2018-02-01,2017-10-01,2017-06-01,2016-12-01,2016-07-01,2016-05-01,2016-01-01,2015-06-15,2015-05-01-preview'.

ERROR: cli.azure.cli.core.azclierror: (InvalidResourceType) The resource type 'checkNameAvailability' could not be found in the namespace 'Microsoft.Storage' for api version '2024-01-01'. The supported api-versions are '2023-05-01,2023-04-01,2023-01-01,2022-09-01,2022-05-01,2021-09-01,2021-08-01,2021-06-01,2021-05-01,2021-04-01,2021-02-01,2021-01-01,2020-08-01-preview,2019-06-01,2019-04-01,2018-11-01,2018-07-01,2018-03-01-preview,2018-02-01,2017-10-01,2017-06-01,2016-12-01,2016-07-01,2016-05-01,2016-01-01,2015-06-15,2015-05-01-preview'.
Code: InvalidResourceType
Message: The resource type 'checkNameAvailability' could not be found in the namespace 'Microsoft.Storage' for api version '2024-01-01'. The supported api-versions are '2023-05-01,2023-04-01,2023-01-01,2022-09-01,2022-05-01,2021-09-01,2021-08-01,2021-06-01,2021-05-01,2021-04-01,2021-02-01,2021-01-01,2020-08-01-preview,2019-06-01,2019-04-01,2018-11-01,2018-07-01,2018-03-01-preview,2018-02-01,2017-10-01,2017-06-01,2016-12-01,2016-07-01,2016-05-01,2016-01-01,2015-06-15,2015-05-01-preview'.
ERROR: az_command_data_logger: (InvalidResourceType) The resource type 'checkNameAvailability' could not be found in the namespace 'Microsoft.Storage' for api version '2024-01-01'. The supported api-versions are '2023-05-01,2023-04-01,2023-01-01,2022-09-01,2022-05-01,2021-09-01,2021-08-01,2021-06-01,2021-05-01,2021-04-01,2021-02-01,2021-01-01,2020-08-01-preview,2019-06-01,2019-04-01,2018-11-01,2018-07-01,2018-03-01-preview,2018-02-01,2017-10-01,2017-06-01,2016-12-01,2016-07-01,2016-05-01,2016-01-01,2015-06-15,2015-05-01-preview'.
Code: InvalidResourceType
Message: The resource type 'checkNameAvailability' could not be found in the namespace 'Microsoft.Storage' for api version '2024-01-01'. The supported api-versions are '2023-05-01,2023-04-01,2023-01-01,2022-09-01,2022-05-01,2021-09-01,2021-08-01,2021-06-01,2021-05-01,2021-04-01,2021-02-01,2021-01-01,2020-08-01-preview,2019-06-01,2019-04-01,2018-11-01,2018-07-01,2018-03-01-preview,2018-02-01,2017-10-01,2017-06-01,2016-12-01,2016-07-01,2016-05-01,2016-01-01,2015-06-15,2015-05-01-preview'.
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fa413837240>]
INFO: az_command_data_logger: exit code: 3
INFO: cli.main: Command ran in 2.661 seconds (init: 0.134, invoke: 2.527)
INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1
INFO: telemetry.client: Accumulated 0 events. Flush the clients.
INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1
INFO: telemetry.save: Save telemetry record of length 5005 in cache file under /home/runner/.azure/telemetry/20250314112035487
INFO: telemetry.main: Begin creating telemetry upload process.
INFO: telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.12/site-packages/azure/cli/telemetry/init.py /home/runner/.azure /home/runner/.azure/telemetry/20250314112035487"
INFO: telemetry.process: Return from creating process 1886
INFO: telemetry.main: Finish creating telemetry upload process.

Expected behavior

Storage account created without errors

Environment Summary

azure-cli 2.70.0

core 2.70.0
telemetry 1.1.0

Extensions:
azure-devops 1.0.1

Dependencies:
msal 1.31.2b1
azure-mgmt-resource 23.1.1

Python location '/opt/az/bin/python3'
Config directory '/home/runner/.azure'
Extensions directory '/opt/az/azcliextensions'

Python (Linux) 3.12.8 (main, Feb 26 2025, 06:59:52) [GCC 13.3.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

Works in the following scenarios:

  • Azure China, az 2.70.0, interactive login as user
  • Azure China, az 2.69.0, interactive login as user + OIDC
  • Azure Global, az 2.69.0 + 2.70.0, interactive login as user + OIDC

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamStorageaz storagecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions