Azure CLI containerapp module fails with "InvalidApiVersionParameter" when system date is set to 2025. The core module has a hardcoded API version "2025-01-01" that is not valid. This affects all containerapp commands when using the core module (not extension) on systems with dates in 2025.
az containerapp list
az containerapp logs show
az containerapp show
ERROR: (InvalidApiVersionParameter) The api-version '2025-01-01' is invalid. The supported versions are '2025-04-01,2025-03-01,2024-10-01-preview,2024-11-01,2024-08-01,2024-07-01,2024-06-01-preview,2024-03-01,2023-07-01,2023-07-01-preview,2023-03-01-preview,2022-12-01,2022-11-01-preview,2022-09-01,2022-06-01,2022-05-01,2022-03-01-preview,2022-01-01,2021-04-01,2021-01-01,2020-10-01,2020-09-01,2020-08-01,2020-07-01,2020-06-01,2020-05-01,2020-01-01,2019-11-01,2019-10-01,2019-09-01,2019-08-01,2019-07-01,2019-06-01,2019-05-10,2019-05-01,2019-03-01,2018-11-01,2018-09-01,2018-08-01,2018-07-01,2018-06-01,2018-05-01,2018-02-01,2018-01-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
# Reproduction script
#!/bin/bash
# Show system date (2025-09-26)
date
# Ensure core module is used (not extension)
az extension remove -n containerapp 2>/dev/null
# Try to list container apps
az containerapp list --resource-group "myresourcegroup" --debug 2>&1 | grep -A5 -B5 "api-version"
Request URL: https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myresourcegroup/providers/Microsoft.App/containerApps?api-version=2025-01-01
Response status: 400
Response headers: {...}
Response content: {"error":{"code":"InvalidApiVersionParameter","message":"The api-version '2025-01-01' is invalid..."}}
Commands should execute successfully using a valid API version like "2024-03-01" instead of the hardcoded "2025-01-01".
azure-cli 2.77.0
core 2.77.0
telemetry 1.1.0
Dependencies:
msal 1.31.0
azure-mgmt-resource 23.2.0
Python location '/opt/az/bin/python3'
Extensions directory '/home/glucose/.azure/cliextensions'
Python (Linux) 3.13.0 (main, Oct 8 2024, 01:04:00) [GCC 11.4.0]
Legal docs and information: aka.ms/AzureCliLegal
This hardcoded value is not a valid API version. The issue only affects the core module - when the containerapp extension is installed, it masks this bug.
Describe the bug
Azure CLI containerapp module fails with "InvalidApiVersionParameter" when system date is set to 2025. The core module has a hardcoded API version "2025-01-01" that is not valid. This affects all containerapp commands when using the core module (not extension) on systems with dates in 2025.
Related command
Errors
Issue script & Debug output
Debug output shows:
Expected behavior
Commands should execute successfully using a valid API version like "2024-03-01" instead of the hardcoded "2025-01-01".
Environment Summary
Additional context
The root cause is in
/opt/az/lib/python3.13/site-packages/azure/cli/command_modules/containerapp/_clients.pyline 19:This hardcoded value is not a valid API version. The issue only affects the core module - when the containerapp extension is installed, it masks this bug.
Workaround:
sudo sed -i 's/CURRENT_API_VERSION = "2025-01-01"/CURRENT_API_VERSION = "2024-03-01"/' \ /opt/az/lib/python3.13/site-packages/azure/cli/command_modules/containerapp/_clients.pySystem Information: