Azure / Azure/azure-rest-api-specs

[BUG] Machine Learning Inferencing - Online Endpoint error if `"userAssignedIdentities": null` is passed for `SystemAssigned` identity

Open
#41,597 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 37m
Merged PRs (30d)
446

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/e0a2361040c9f44f94ad57dcf7fdcd07032f26cf/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2025-12-01/openapi.json#L29622

### API Spec version

2025-12-01, 2025-09-01, 2025-06-01

### Describe the bug

While passing `"userAssignedIdentities": null` with `SystemAssigned` identity, the API throws an error which is unexpected. Here is an example payload:

```json
{
"identity": {
"type": "SystemAssigned",
"userAssignedIdentities": null
},
"location": "australiaeast",
"properties": {
"authMode": "AMLToken",
"description": "Auto-generated test resource",
"publicNetworkAccess": "Enabled"
}
}
```

This is problematic for Terraform as this is a standard identity payload which is generated by TF. Because of this error, the Terraform resource for ML Online endpoints is blocked.

### Expected behavior

The API should ignore the "userAssignedIdentities" as it's set to null and the online endpoint should be created successfully.

### Actual behavior

The API throws the following error:

```
"message": "Error converting value {null} to type 'System.Collections.Generic.Dictionary`2[System.String,Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20251201.ArmCommon.UserAssignedIdentity]'. Path 'identity.userAssignedIdentities', line 1, position 207."}
```

### Reproduction Steps

Use the above payload to create a ML online endpoint.

### Environment

```
$ dotnet --info
.NET SDK:
Version: 10.0.104
Commit: 80d3e14f5e
Workload version: 10.0.100-manifests.c7707153
MSBuild version: 18.0.11+80d3e14f5

Runtime Environment:
OS Name: ubuntu
OS Version: 24.04
OS Platform: Linux
RID: ubuntu.24.04-x64
Base Path: /usr/lib/dotnet/sdk/10.0.104/

.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.

Host:
Version: 10.0.4
Architecture: x64
Commit: 80d3e14f5e

.NET SDKs installed:
10.0.104 [/usr/lib/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.4 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.4 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
DOTNET_BUNDLE_EXTRACT_BASE_DIR [/home/xxx/.cache/dotnet_bundle_extract]

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download
```

Contributor guide

Open the contributing guide

Research direction

Start with the linked 2025-12-01 OpenAPI specification at the MachineLearningServices path around line 29622, comparing the listed API versions. Reproduce the endpoint creation with the provided JSON payload and verify that a SystemAssigned identity with userAssignedIdentities set to null is accepted without the conversion error.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.