Azure / Azure/azure-rest-api-specs

[BUG] MongoCluster API responds with HTTP 500 when changing from no identity to user assigned identity

Open
#38,811 0 comments 0 reactions 0 assignees View on GitHub
bug customer-reported Mgmt question Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

### API Spec link

[azure-rest-api-specs/specification/mongocluster/resource-manager/Microsoft.DocumentDB/MongoCluster/stable/2025-09-01/mongoCluster.json](https://github.com/Azure/azure-rest-api-specs/blob/b7943b8282c0d50ecc6197c5582d2bc4797415dc/specification/mongocluster/resource-manager/Microsoft.DocumentDB/MongoCluster/stable/2025-09-01/mongoCluster.json#L2034-L2037)

### API Spec version

2025-09-01

### Describe the bug

Unable to add UAI to existing cluster

### Expected behavior

Able to add UAI to existing cluster, or API responds with an informative error message rather than `Internal server error`

### Actual behavior

API responds with 500 internal server error:

```
{
"error": {
"code": "internal_server_error",
"message": "Internal server error."
}
}
```

### Reproduction Steps

1. Create a cluster using the API without adding the `identity` object.
2. Update the cluster, adding the `identity` object

### Environment

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the referenced specification/mongocluster/resource-manager/Microsoft.DocumentDB/MongoCluster/stable/2025-09-01/mongoCluster.json around lines 2034-2037, then reproduce the update by creating a cluster without identity and adding a user-assigned identity. Done means the update succeeds or returns an informative error instead of HTTP 500.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api, cloud, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.