Azure / Azure/azure-rest-api-specs

Microsoft.Media/mediaservices@2021-11-01 identity `"type": "SystemAssigned, UserAssigned"` return 500 error

Open
#21,905 1 comment 0 reactions 0 assignees View on GitHub
Media Services Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
6k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

### swagger
https://github.com/Azure/azure-rest-api-specs/blob/55dd4f72d2b2769c1e02f2b952e597f806d40f9a/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/Accounts.json#L624-L629
if pass `"type": "SystemAssigned, UserAssigned"` will get 500 error. the allowed value should be `"SystemAssigned,UserAssigned"` with no space in it.
### API flow:

PUT https://management.azure.com/subscriptions/XXXX/resourceGroups/acctestRG-media-1/providers/Microsoft.Media/mediaservices/acctestmswtwtas?api-version=2021-11-01

```json
{
"name": "acctestXXXXtas",
"id": "/subscriptions/XXXX/resourceGroups/acctestRG-media-1/providers/Microsoft.Media/mediaservices/acctestmswtwtas",
"type": "Microsoft.Media/mediaservices",
"location": "West US",
"tags": {
"environment": "staging"
},
"properties": {
"mediaServiceId": "XXXX",
"storageAccounts": [
{
"id": "/subscriptions/XXXX/resourceGroups/acctestRG-media-1/providers/Microsoft.Storage/storageAccounts/accteXXXXwestus",
"type": "Primary"
}
],
"storageAuthentication": "System",
"encryption": {
"type": "SystemKey"
},
"keyDelivery": {
"accessControl": {
"defaultAction": "Allow",
"ipAllowList": []
}
},
"publicNetworkAccess": "Enabled",
"privateEndpointConnections": []
},
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/XXXX/resourceGroups/acctestRG-media-1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/acctestwestus": {}
}
}
}
```
500 Internal Server Error
x-ms-request-id: 81d05c24-51b8-4042-9d5e-06750f540ef3
```json
{
"error": {
"code": "InternalServerError",
"message": "The server encountered an internal error. Please try again later."
}
}
```

Contributor guide

Open the contributing guide

Research direction

Start at specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/Accounts.json lines 624-629 and inspect the identity type definition. Reproduce the documented PUT request with the spaced identity value, compare it with the no-space value, and verify that the specification permits the value accepted by the API without producing a 500 response.

Written by the indexing model from the issue text.

Assessment

Tech stack
json, openapi
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.