Skip to content

Additional properties are omitted from SDK resource payloads with some TSP setups. #34482

Open

Description

Describe the bug

See Azure/azure-sdk-for-python#50097 for issue, details, and screenshots. At first, I thought it was SDK related, but debugging confirmed it to be caused by some post processing the AZ CLI does in AzCliCommandInvoker.

This does not happen for the deployments package. The TSP defines the config type as this: https://github.com/Azure/azure-rest-api-specs/blob/cde14dc6e822421cb8946e22a5424e8867582700/specification/resources/resource-manager/Microsoft.Resources/deployments/models.tsp#L1311

Deployment stacks, the affected package, defines the type as this: azure-rest-api-specs/specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/m…

model Example
{
  config?: Record<DeploymentExtensionConfigItem> // this is fine
}

model DeploymentExtensionConfig is Record<DeploymentExtensionConfigItem>
model DeploymentExtension
{
  config?: DeploymentExtensionConfig // model "is record" causes additional properties not to display in CLI outputs.
}

Related command

az stack group create

Errors

N/A, display issue

Issue script & Debug output

N/A, related to AzCommandInvoker response post-processing.

Expected behavior

The additional properties should show in this case.

Environment Summary

azure-cli 2.93.0

core 2.93.0
telemetry 1.1.0

Extensions:
azure-devops 1.0.10
blueprint 1.0.0b3
virtual-wan 1.0.1

Dependencies:
msal 1.39.0
azure-mgmt-resource 24.0.0

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\kylealbert.azure'
Extensions directory 'C:\Users\kylealbert.azure\cliextensions'

Python (Windows) 3.14.10 (tags/v3.14.10:b703b2c, Oct 25 2026, 17:36:52) [MSC v.1944 64 bit (AMD64)]

Additional context

No response

Activity

  1. added
    bug
    on Nov 23, 2026
  2. added
    Auto-Assign
    Azure Deployments
    Service Attention
    on Nov 23, 2026
  3. torreymicrosoft commented on Nov 23, 2026

    @torreymicrosoft
    Member

    Thanks Kyle Albert (@kalbert312) for the detailed write-up and for tracing this past the SDK.

    I checked this against the Azure CLI 2.93.0 source (the latest release) and its bundled azure-mgmt-resource-deploymentstacks 1.0.0 and azure-core 1.39.0. I ran the CLI's own todict locally on a stack the SDK deserialized from a sample response (I didn't call Azure):

    • The SDK model keeps the data (dict(config) and as_dict() return it), but todict gives config: {}, with or without remove_additional_prop_layer.
    • For TypeSpec models, todict only walks azure-core's attribute_list(), which lists declared attributes, and DeploymentExtensionConfig declares none.
    • For comparison, the inline Record<> on extensionConfigs keeps its keys (each value becomes {}), and the deployments SDK's msrest model keeps config.
    • todict only runs on the command result, so the request looks unaffected. dev still has the same todict, and I couldn't find another issue or PR for this.

    So the change looks like it belongs in azure-cli-core's todict rather than the stacks SDK or spec. As a workaround, az rest returns the raw response (I checked the syntax in --help on 2.93.0 but didn't run it against Azure):

    az rest --url "/subscriptions/{subscriptionId}/resourceGroups/<rg>/providers/Microsoft.Resources/deploymentStacks/<stack>?api-version=2025-07-01" --query "properties.deploymentExtensions"
    

    If you've seen this outside az stack, please add the command here.


    AI was leveraged to draft this first-pass triage reply from the Azure ARM Deployments team, and mistakes may have been made. I'm a real person on the team: if anything here is wrong or misses your point, reply on the thread and feel free to tag me (Torrey Trahanovsky (@torreymicrosoft)).

  4. added
    Core
    Azure CLI Team
    on Nov 23, 2026
  5. microsoft-github-policy-service commented on Nov 23, 2026

    @microsoft-github-policy-service
    Contributor

    Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/deployments-owners, @Azure/act-identity-squad.

  6. microsoft-github-policy-service commented on Nov 23, 2026

    @microsoft-github-policy-service
    Contributor

    Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/deployments-owners, @Azure/act-identity-squad.

  7. microsoft-github-policy-service commented on Nov 23, 2026

    @microsoft-github-policy-service
    Contributor

    Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/deployments-owners, @Azure/act-identity-squad.

  8. added
    Azure CLI Team
    and removed
    Azure CLI Team
    Service Attention
    on Nov 23, 2026
  9. yonzhan commented on Nov 23, 2026

    @yonzhan
    Collaborator

    az stack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAzure CLI TeamAzure DeploymentsCoreact-quality-productivity-squadbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions