Skip to content

[BUG] Machine Learning Batch Endpoint API Spec documents unsupported identity types #40149

@promisinganuj

Description

@promisinganuj

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2025-09-01/mfe.json#L13050-L13052

API Spec version

2025-06-01, 2025-09-01

Describe the bug

According to the API spec the API supports system assigned and/or user assigned identities. But passing a user assigned identity results in the following error:

Error when passing "SystemAssigned,UserAssigned":

{
  "error": {
    "code": "CannotSetResourceIdentity",
    "message": "Resource type 'Microsoft.MachineLearningServices/workspaces/batchEndpoints' does not support creation of 'SystemAssigned, UserAssigned' resource identity. The supported types are 'SystemAssigned'."
  }
}

Error when passing "UserAssigned":

{
  "error": {
    "code":" CannotSetResourceIdentity",
    "message": "Resource type 'Microsoft.MachineLearningServices/workspaces/batchEndpoints' does not support creation of 'UserAssigned' resource identity. The supported types are 'SystemAssigned'."
  }
}

This is causing issues downstream in an SDK generated from this API spec.

Expected behavior

As batch endpoint only support SystemAssigned identity, the identity block should reference the right identity definition. Currently, it refers to:

      "properties": {
        "identity": {
          "description": "Managed service identity (system assigned and/or user assigned identities)",
          "$ref": "../../../../../common-types/resource-management/v3/managedidentity.json#/definitions/ManagedServiceIdentity"
        }

Instead, it should be referring it.

"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/Identity"

And the description should be updated accordingly.

Actual behavior

Error as described above

Reproduction Steps

PUT https://management.azure.com/subscriptions/{subscriptionID}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{machineLearningWorkspaceName}/batchEndpoints/{batchEndpointName}?api-version=2025-09-01

{
    "identity": {
        "type": "SystemAssigned,UserAssigned",
        "userAssignedIdentities": {
            "identityId": {}
        }
    },
    "location": "australiaeast",
    "properties": {
        "authMode": "AADToken",
        "description": "Test batch endpoint"
    },
    "tags": {
        "Environment": "Test"
    }
}

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue requires a change to an existing behavior in the product in order to be resolved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions