Skip to content

[stream-analytics] The customer encountered an issue while creating an Azure Stream Analytics output using Azure CLI. #10164

Closed

Description

@x-engineering-agent

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.

Image
  • 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:

Image

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:

Image

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:

Image

And Input types:

Image

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

Azure/azure-cli#33553

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

  1. x-engineering-agent commented on Jul 31, 2026

    @x-engineering-agent
    Author

    X Engineering Agent Bug analysis: Root cause analysis

    The stream-analytics extension'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 the properties.identity (Managed Identity) feature added in 2021-10-01-preview for connection types including:

    • CosmosDB output with Managed Identity
    • Service Bus Queue output with Managed Identity
    • Service Bus Topic output with Managed Identity
    • Azure Synapse output
    • Azure Data Explorer output
    • SQL Server output with Managed Identity

    Error observed:

    (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.
    

    Root cause: API version mismatch between what the stream-analytics extension'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 input by 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 the 2021-10-01-preview API version) should be applied here for the output commands.

    Repro command:

    az stream-analytics output create --job-name <job> --resource-group <rg> --output-name cosmosdb --datasource output_cosmosdb_msi.json --serialization serialization.json
    

    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 types

    PR 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):

    [Stream Analytics] Fix #10164: `az stream-analytics output create`: fix unsupported API version for managed identity output types
    

    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:

    • Link the issue — start the Description with a closing keyword so the PR auto-links and closes it: Fixes #10164.
    • Related command — the az ... command this affects.
    • Description (mandatory) — why the bug happens, what you changed, and the resulting behavior.
    • Testing Guide — example command(s) showing the fix works.
    • History Notes — leave the title to drive the history note, or add extra lines in the same format (component in brackets + the command in backticks), e.g. [Stream Analytics] `az <command>`: <note>.
    • Keep the template checklist and tick the items you've satisfied.

    X Engineering Agent · Fixer · react 👍 / 👎 to train the agent

  2. yonzhan commented on Jul 31, 2026

    @yonzhan
    Collaborator

    Thank you for opening this issue, we will look into it.

  3. added
    questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
    customer-reportedIssues that are reported by GitHub users external to the Azure organization.
    on Jul 31, 2026
  4. added this to the Backlog milestone on Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Auto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.Stream Analyticscustomer-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