Skip to content

The identity in service bus namespace is wrong #10379

@ArcturusZhang

Description

@ArcturusZhang

Problematic swagger:

The identity is expected to be in the root level of the request body, but now it is in the properties level.

Justification: I have tried the following request:

PUT https://management.azure.com/subscriptions/REDACTED/resourceGroups/group1/providers/Microsoft.ServiceBus/namespaces/test-namespace?api-version=2018-01-01-preview

with the body

{
    "location": "westus2",
    "properties": {
        "zoneRedundant": false
    },
    "sku": {
        "name": "Premium",
        "tier": "Premium",
        "capacity": 1
    },
    "tags": {
        "source": "terraform"
    },
    "identity": {
        "type": "SystemAssigned"
    }
}

works fine, and get the response:

{
    "sku": {
        "name": "Premium",
        "tier": "Premium",
        "capacity": 1
    },
    "id": "/subscriptions/REDACTED/resourceGroups/group1/providers/Microsoft.ServiceBus/namespaces/test-namespace",
    "name": "test-namespace",
    "type": "Microsoft.ServiceBus/Namespaces",
    "location": "West US 2",
    "tags": {
        "source": "terraform"
    },
    "identity": {
        "principalId": "REDACTED",
        "tenantId": "REDACTED",
        "type": "SystemAssigned"
    },
    "properties": {
        "zoneRedundant": false,
        "provisioningState": "ActivatingIdentity",
        "metricId": "85b3dbca-5974-4067-9669-67a141095a76:test-namespace",
        "createdAt": "2020-08-07T06:19:16.72Z",
        "updatedAt": "2020-08-07T06:19:16.72Z",
        "serviceBusEndpoint": "https://test-namespace.servicebus.windows.net:443/",
        "status": "Activating"
    }
}

Please note in this working example, the identity is in the root level rather than as defined in the swagger - in the properties level. But if I change my request body by moving the identity block into properties, the created namespace will not have an identity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Service AttentionWorkflow: This issue is responsible by Azure service team.Service Bus

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions