Azure CLI: az webapp deploy fails in Azure Government (usgovarizona) due to unsupported API version 2024-11-01
Describe the bug
The latest Azure CLI (as of Aug 2025) uses API version 2024-11-01 for Microsoft.Web/sites by default, which is not supported in the usgovarizona region.
This causes az webapp deploy to fail with NoRegisteredProviderFound, breaking our deployment pipelines.
Please update the CLI to detect supported API versions per region (especially for Azure Government) or provide a way to override it in CLI commands.
Related command
az webapp deploy
Errors
YML pipeline extract:
script: - curl -sL https://aka.ms/InstallAzureCLIDeb | bash - az cloud set --name AzureUSGovernment - az login --service-principal -u "$AZURE_TEST_APP_ID" -p "$AZURE_TEST_SECRET" --tenant "$AZURE_TENANT_ID" - az webapp deploy --resource-group "$AZURE_TEST_RG" --name "$AZURE_TEST_WEBAPP_BE" --src-path $ZIP_FILE --type zip rules: - if: '$CI_COMMIT_BRANCH == "main"' ERROR: Job failed: exit code 1
Issue script & Debug output
Code: NoRegisteredProviderFound Message: No registered resource provider found for location 'usgovarizona' and API version '2024-11-01' for type 'sites'. The supported api-versions are '2024-04-01, 2023-12-01, 2023-01-01, 2022-09-01, 2022-03-01, 2021-03-01, 2021-02-01, 2021-01-15, 2021-01-01, 2020-12-01, 2020-10-01, 2020-09-01, 2020-06-01, 2019-08-01, 2018-11-01, 2018-02-01, 2016-08-01, 2016-03-01, 2015-08-01, 2015-07-01, 2015-06-01, 2015-05-01, 2015-04-01, 2015-02-01, 2014-11-01, 2014-06-01, 2014-04-01, 2014-04-01-preview'. The supported locations are 'usdodeast, usgovvirginia, usdodcentral, usgovarizona, usgovtexas'.
Expected behavior
I should have been able to deploy with the az webapp deploy to my app living in usgovarizona
Environment Summary
attempting to deploy barebones .NET 8 API using Code publishing model on Windows host via GitLab v18.2.1-ee pipeline.
azure-cli_2.76.0-1~bookworm_amd64.deb
Additional context
I noticed a few weeks ago I tried this to another web app in the same rg and did not get this problem; it was the same tenant and app service.
Hi @igor92128,
This is a known issue.
Please follow https://github.com/Azure/azure-cli/issues/23985#issue-1383263012 to get temporary workaround.
If you feel that further discussion is needed, please add a comment with the text /clibot unresolve to reopen the issue.
Thank you for opening this issue, we will look into it.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp, @yutanglin16.
Here are some similar issues that might help you. Please check if they can solve your problem.
- #30715
- #22661
- #18006
Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)
Solution 1:
Switch the Azure CLI profile to a version that supports the required API versions for Azure Government. For example, you can use the following command before running your deployment:
az cloud set -n AzureUSGovernment --profile 2020-09-01-hybrid
After completing your deployment, you can switch back to the latest profile if needed:
az cloud set -n AzureUSGovernment --profile latest
Reference:
- https://github.com/azure/azure-cli/issues/22661#issuecomment-1140156311
- https://github.com/azure/azure-cli/issues/18006#issuecomment-845238304
Solution 2:
If the environment allows, temporarily downgrade the Azure CLI version to one that uses an API version supported in Azure Government. For example, you can downgrade to a version that worked previously, such as 2.36.0.
Reference:
- https://github.com/azure/azure-cli/issues/22661#issuecomment-1140156311
Powered by issue-sentinel
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp, @yutanglin16.
If I downgrade to CLI version 2.75, it worked.
/clibot unresolve
this is still happening with az webapp commands in China
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp, @yutanglin16.