Repository navigation
Description
Source: Azure/azure-cli#33816 (by harishadf)
Affected extension: stream-analytics (src/stream-analytics/)
<<UNTRUSTED:issue-33816>>
Issue #33816 (by harishadf)
Title
The customer encountered an issue while creating an Azure Stream Analytics output using Azure CLI.
Body
Describe the bug
Resource Provider
Microsoft.StreamAnalytics
Description of Feature or Work Requested
Trying to create an Azure Stream Analytics(ASA) Output via CLI command where they are getting the issues
Related doc: https://learn.microsoft.com/en-us/cli/azure/stream-analytics/input?view=azure-cli-latest
Reported Issue:
Old issue fixed in past similar to this issue
-
The customer encountered an issue while creating an Azure Stream Analytics output using Azure CLI.
-
The error message received was: "Feature or property 'CosmosDB Output Managed Identity' is not supported in API version 2020-03-01. Please use API version 2021-10-01-preview.
lakshmi [ ~ ]$ az stream-analytics output create --job-name asatest --resource-group az_policy_ty474_asa --output-name cosmosdb --datasource output_cosmosdb_msi.json --serialization serialization.json
Preview version of extension is disabled by default for extension installation, enabled for modules without stable versions.
Please run 'az config set extension.dynamic_install_allow_preview=true or false' to config it specifically.
The command requires the extension stream-analytics. Do you want to install it now? The command will continue to run after the extension is installed. (Y/n): y
Run 'az config set extension.use_dynamic_install=yes_without_prompt' to allow installing extensions without prompt.
(BadRequest) Feature or property 'CosmosDB Output Managed Identity' is not supported in API version 2020-03-01. Please use API version 2021-10-01-preview.
Code: BadRequest
Message: Feature or property 'CosmosDB Output Managed Identity' is not supported in API version 2020-03-01. Please use API version 2021-10-01-preview.
-
The problem appears specific to the CLI, as the customer can perform the operation successfully through the Azure portal (UX).
-
The Stream Analytics job location is West Europe.
Cause Determined
- The issue is related to a mismatch between the API version used by the Azure CLI Stream Analytics command and the API version required for the Cosmos DB Output Managed Identity feature.
Advised to create GitHub item: [Stream Analytics] Migrate az stream-analytics input to AAZ by huiii99 · Pull Request #10031 · Azu..., where the issue was fixed.
Short summary about the issue:
How it started:
Customer has a policy that will deny the creation of Input/Output with ConnectionString auth type. This policy was working only when the Input/Output were created manually from Portal, but when created using CLI commands, the policy was not triggered.
2. After the CLI team fixed this issue, when customer was trying to deploy a SQLServer Output with MI (Managed Identity) auth, the CLI command was throwing an error like:
"
(BadRequest) Feature or property 'SQL Reference Input Managed Identity' is not supported in API version 2020-03-01. Please use API version 2021-10-01-preview.
Code: BadRequest
"
Now:
Customer is reporting the same (BadRequest) error for other types of Outputs:
Service Bus Queue output with Managed Identity.
Service Bus Topic output with Managed Identity.
Azure Synapse output.
Azure Data Explorer output.
Azure Cosmos DB output with Managed Identity.
I was able to reproduce for some of them:
For CosmosDB:
JSON Definition
(saved in "CosmosDbOutputDefinition.json" file)
{
"type": "Microsoft.Storage/DocumentDB",
"properties": {
"collectionNamePattern": "1",
"accountId": "babocosmosnosql",
"accountKey": null,
"database": "Transactional",
"authenticationMode": "Msi"
}
}
CLI Command
az stream-analytics output create --output-name cosmosOutput-cli256
--job-name baboasawe --resource-group ASA_rg
--subscription 65dc4858-8a91-4496-8faf-9568b7a878d5 --datasource "@CosmosDbOutputDefinition.json"
#######
Result:
For Synapse:
JSON Definition
(saved in "SynapseOutputDefinition.json" file)
{
"type": "Microsoft.Sql/Server/DataWarehouse",
"properties": {
"table": "babogdan",
"server": "babosynapsewe.sql.azuresynapse.net",
"database": "testPool",
"user": null,
"authenticationMode": "Msi"
}
}
CLI Command
az stream-analytics output create --output-name SynapseOutput-cli256
--job-name baboasawe --resource-group ASA_rg
--subscription 65dc4858-8a91-4496-8faf-9568b7a878d5 --datasource "@SynapseOutputDefinition.json"
#######
Result:
Same apply to all bellow Output types, when using Managed Identity:
Service Bus Queue,
Service Bus Topic,
Azure Data Explorer
Since this is a new API version, might impact all other Input / Output types.
Output types in Stream Analytics:
And Input types:
Perhaps CLI team should work with ASA Team to make sure this issue is resolved for all Input and Output types.
lakshmi [ ~ ]$ az --version
azure-cli 2.87.0 *
core 2.87.0 *
telemetry 1.1.0
Extensions:
ml 2.43.0
ssh 2.0.9
stream-analytics 1.0.5
Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0
Related command
az stream-analytics output create --job-name asatest --resource-group az_policy_ty474_asa --output-name cosmosdb --datasource output_cosmosdb_msi.json --serialization serialization.json
Errors
(BadRequest) Feature or property 'CosmosDB Output Managed Identity' is not supported in API version 2020-03-01. Please use API version 2021-10-01-preview.
Code: BadRequest
Message: Feature or property 'CosmosDB Output Managed Identity' is not supported in API version 2020-03-01. Please use API version 2021-10-01-preview.**
Issue script & Debug output
Trying to create an Azure Stream Analytics(ASA) Output via CLI command where they are getting the issues
Expected behavior
Trying to create an Azure Stream Analytics(ASA) Output via CLI command where they are getting the issues, it should work fine.
Environment Summary
lakshmi [ ~ ]$ az --version
azure-cli 2.87.0 *
core 2.87.0 *
telemetry 1.1.0
Extensions:
ml 2.43.0
ssh 2.0.9
stream-analytics 1.0.5
Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0
Python location '/usr/bin/python3.12'
Config directory '/home/lakshmi/.azure'
Extensions directory '/home/lakshmi/.azure/cliextensions'
Extensions system directory '/usr/lib/python3.12/site-packages/azure-cli-extensions'
Python (Linux) 3.12.9 (main, Jun 2 2026, 15:06:48) [GCC 13.2.0]
Legal docs and information: aka.ms/AzureCliLegal
You have 2 update(s) available. They will be updated with the next build of Cloud Shell.
lakshmi [ ~ ]$
Additional context
Comments
Comment by @azure-client-tools-bot-prd[bot]
Hi harishadf,
2.87.0 is not the latest Azure CLI(2.88.0).
If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.
Comment by Yong Zhang (@yonzhan)
Thank you for opening this issue, we will look into it.
<<END:issue-33816>>
Activity
x-engineering-agent commentedon Jul 31, 2026
The
stream-analyticsextension's output-create (and related input/output) commands are still targeting an older Stream Analytics API version (2020-03-01) for several output/input types. That version does not support theproperties.identity(Managed Identity) feature added in2021-10-01-previewfor connection types including:Error observed:
Root cause: API version mismatch between what the
stream-analyticsextension's SDK/client sends and what's required for Managed Identity support on these output/input types.Reference fix: A similar issue was previously fixed for
az stream-analytics inputby migrating to AAZ (see PR #10031). The same approach (bump/align API version used by the output commands, or migrate the affected commands to AAZ using the2021-10-01-previewAPI version) should be applied here for the output commands.Repro command:
Expected behavior: The output should be created successfully with Managed Identity auth, matching what the Azure Portal supports.
Use this EXACT PR title:
[Stream Analytics] Fix #10164:az stream-analytics output create: fix unsupported API version for managed identity output typesPR 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 #10164:prefix. You may only adjust the wording after the command (the final summary) if the fix changes; the[Stream Analytics]prefix, issue link, and backticked command must stay.Description — follow the PR template and fill in:
Fixes #10164.az ...command this affects.[Stream Analytics] `az <command>`: <note>.yonzhan commentedon Jul 31, 2026
Thank you for opening this issue, we will look into it.