Azure / Azure/azure-cli-extensions

`az devcenter admin project-environment-type list` fails with `HttpResponsePayloadAPISpecValidationFailed` exception

Open
#9,622 2 comments 0 reactions 0 assignees View on GitHub
bug Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Describe the bug

`az devcenter admin project-environment-type list` fails consistently with:
- `HttpResponsePayloadAPISpecValidationFailed`
- `ObjectMissingRequiredProperty`
- `Missing required property: location. Paths in payload: '$.value[0].location'`

Not sure if this is related to #9574.

### Related command

```bash
az devcenter admin project-environment-type list \
--project-name "" \
--resource-group "" \
-o json
```

### Errors

```text
(HttpResponsePayloadAPISpecValidationFailed) Failed to create HTTP response as per the API specification with one or more errors. Please see details for more information. Consider to retry operation with api-versions ''.
Code: HttpResponsePayloadAPISpecValidationFailed
Message: Failed to create HTTP response as per the API specification with one or more errors. Please see details for more information. Consider to retry operation with api-versions ''.
Exception Details:
(ObjectMissingRequiredProperty) Missing required property: location. Paths in payload: '$.value[0].location'
Code: ObjectMissingRequiredProperty
Message: Missing required property: location. Paths in payload: '$.value[0].location'
```

### Issue script & Debug output

```text
DEBUG: cli.knack.cli: Command arguments: ['devcenter', 'admin', 'project-environment-type', 'list', '--project-name', '', '--resource-group', '', '--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 [, , ]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'devcenter': ['azext_devcenter']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name Load Time Groups Commands
DEBUG: cli.azure.cli.core: Total (0) 0.000 0 0
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: devcenter 0.307 44 166 /.azure/cliextensions/devcenter
DEBUG: cli.azure.cli.core: Total (1) 0.307 44 166
DEBUG: cli.azure.cli.core: Loaded 44 groups, 166 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command : devcenter admin project-environment-type list
DEBUG: cli.azure.cli.core: Command table: devcenter admin project-environment-type list
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate []
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/.azure/commands/2026-02-20.18-50-21.devcenter_admin_project-environment-type_list.5183.log'.
INFO: az_command_data_logger: command args: devcenter admin project-environment-type list --project-name {} --resource-group {} --debug
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [.add_subscription_parameter at 0x773bf9b64c20>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [.add_ids_arguments at 0x773bf9b66f20>, .add_cache_arguments at 0x773bf9b67100>, .update_breaking_change_info at 0x773bf9b671a0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [, , .parse_ids_arguments at 0x773bf9b66fc0>]
INFO: az_command_data_logger: extension name: devcenter
INFO: az_command_data_logger: extension version: 8.0.0
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='/.azure/msal_token_cache.json', encrypt=False
DEBUG: cli.azure.cli.core.auth.binary_cache: load: /.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.microsoftonline.com/
DEBUG: msal.authority: openid_config("https://login.microsoftonline.com//v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com//oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic', 'self_signed_tls_client_auth'], 'jwks_uri': 'https://login.microsoftonline.com//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'], 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com//oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com//oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com//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.microsoftonline.com//kerberos', 'mtls_endpoint_aliases': {'token_endpoint': 'https://mtlsauth.microsoft.com//oauth2/v2.0/token'}, 'tls_client_certificate_bound_access_tokens': True, 'tenant_region_scope': 'NA', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
DEBUG: msal.application: Broker enabled? None
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_credentials: UserCredential.acquire_token: scopes=['https://management.core.windows.net//.default'], claims_challenge=None, kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id:
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.DevCenter/projects//environmentTypes?api-version=2025-10-01-preview'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': ''
DEBUG: cli.azure.cli.core.sdk.policies: 'CommandName': 'devcenter admin project-environment-type list'
DEBUG: cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--project-name --resource-group --debug'
DEBUG: cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.83.0 (DEB) azsdk-python-core/1.38.0 Python/3.13.11 (Linux-6.6.87.2-microsoft-standard-WSL2-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: This request has no body
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions//resourceGroups//providers/Microsoft.DevCenter/projects//environmentTypes?api-version=2025-10-01-preview HTTP/1.1" 412 405
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 412
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-Length': '405'
DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies: 'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-operation-identifier': ''
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-providerhub-traffic': 'True'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-failure-cause': 'provider-api-validation'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-request-id': ''
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': ''
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-reads': '249'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'EASTUS:20260220T185022Z:'
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: 'X-Cache': 'CONFIG_NOCACHE'
DEBUG: cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': ''
DEBUG: cli.azure.cli.core.sdk.policies: 'Date': 'Fri, 20 Feb 2026 18:50:21 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"error":{"code":"HttpResponsePayloadAPISpecValidationFailed","target":"","message":"Failed to create HTTP response as per the API specification with one or more errors. Please see details for more information. Consider to retry operation with api-versions ''.","details":[{"code":"ObjectMissingRequiredProperty","message":"Missing required property: location. Paths in payload: '$.value[0].location'"}]}}
DEBUG: cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/az/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 669, in execute
raise ex
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 737, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 719, in _run_job
result = list(result)
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/aaz/_paging.py", line 87, in __next__
return next(self._page_iterator)
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/aaz/_paging.py", line 43, in __next__
self._executor(self._next_link)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/aaz/_command.py", line 250, in executor_wrapper
executor()
~~~~~~~~^^
File "/.azure/cliextensions/devcenter/azext_devcenter/aaz/latest/devcenter/admin/project_environment_type/_list.py", line 65, in _execute_operations
self.ProjectEnvironmentTypesList(ctx=self.ctx)()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/.azure/cliextensions/devcenter/azext_devcenter/aaz/latest/devcenter/admin/project_environment_type/_list.py", line 90, in __call__
return self.on_error(session.http_response)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/aaz/_operation.py", line 327, in on_error
raise HttpResponseError(response=response, error_format=error_format)
azure.core.exceptions.HttpResponseError: (HttpResponsePayloadAPISpecValidationFailed) Failed to create HTTP response as per the API specification with one or more errors. Please see details for more information. Consider to retry operation with api-versions ''.
Code: HttpResponsePayloadAPISpecValidationFailed
Message: Failed to create HTTP response as per the API specification with one or more errors. Please see details for more information. Consider to retry operation with api-versions ''.
Exception Details: (ObjectMissingRequiredProperty) Missing required property: location. Paths in payload: '$.value[0].location'
Code: ObjectMissingRequiredProperty
Message: Missing required property: location. Paths in payload: '$.value[0].location'

ERROR: cli.azure.cli.core.azclierror: (HttpResponsePayloadAPISpecValidationFailed) Failed to create HTTP response as per the API specification with one or more errors. Please see details for more information. Consider to retry operation with api-versions ''.
Code: HttpResponsePayloadAPISpecValidationFailed
Message: Failed to create HTTP response as per the API specification with one or more errors. Please see details for more information. Consider to retry operation with api-versions ''.
Exception Details: (ObjectMissingRequiredProperty) Missing required property: location. Paths in payload: '$.value[0].location'
Code: ObjectMissingRequiredProperty
Message: Missing required property: location. Paths in payload: '$.value[0].location'
ERROR: az_command_data_logger: (HttpResponsePayloadAPISpecValidationFailed) Failed to create HTTP response as per the API specification with one or more errors. Please see details for more information. Consider to retry operation with api-versions ''.
Code: HttpResponsePayloadAPISpecValidationFailed
Message: Failed to create HTTP response as per the API specification with one or more errors. Please see details for more information. Consider to retry operation with api-versions ''.
Exception Details: (ObjectMissingRequiredProperty) Missing required property: location. Paths in payload: '$.value[0].location'
Code: ObjectMissingRequiredProperty
Message: Missing required property: location. Paths in payload: '$.value[0].location'
DEBUG: cli.knack.cli: Event: Cli.PostExecute []
INFO: az_command_data_logger: exit code: 1
INFO: cli.__main__: Command ran in 1.094 seconds (init: 0.157, invoke: 0.937)
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 4995 in cache file under /.azure/telemetry/20260220185022152
INFO: telemetry.main: Begin creating telemetry upload process.
INFO: telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.13/site-packages/azure/cli/telemetry/__init__.py /.azure /.azure/telemetry/20260220185022152"
INFO: telemetry.process: Return from creating process 5206
INFO: telemetry.main: Finish creating telemetry upload process.
```

### Expected behavior

Command returns JSON list of project environment types.

### Environment Summary

```text
azure-cli 2.83.0

core 2.83.0
telemetry 1.1.0

Extensions:
account 0.2.5
devcenter 8.0.0

Dependencies:
msal 1.35.0b1
azure-mgmt-resource 23.3.0

Python location '/opt/az/bin/python3'
Config directory '/home/vscode/.azure'
Extensions directory '/home/vscode/.azure/cliextensions'

Python (Linux) 3.13.11 (main, Jan 27 2026, 07:24:17) [GCC 13.3.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.
```

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.