Azure / Azure/azure-cli

System assigned identity is enabled by default while assigning identity to the registry

Open
#24,687 6 comments 0 reactions 2 assignees Claimed by @lizMSFT View on GitHub
act-observability-squad Auto-Assign Container Registry Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

For an acr registry, if I assign an identity using "acr identity assign" command system assigned identity is enabled by default

Steps to reproduce

**az acr identity show -n cmkreg1117 -g cmkregistrytest1117**

```json
{
"principalId": null,
"tenantId": null,
"type": "userAssigned",
"userAssignedIdentities": {
"/subscriptions//resourcegroups/cmkregistrytest1117/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cmkregistrytest1117": {
"clientId": "646f5e74-1df4-481b-a01f-8a7834d5ab25",
"principalId": "e926fd96-1b57-4ac5-b39d-ebcfef34cfe5"
}
}
}
```

**az acr identity assign -n cmkreg1117 -g cmkregistrytest1117 --identities /subscriptions//resourcegroups/cmkregistrytest1117/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cmkregistrytest1117 --verbose**

```json
"identity": {
"principalId": "6d5663e1-e20f-4544-9d3a-ceba2dcf8296",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"type": "systemAssigned, userAssigned",
"userAssignedIdentities": {
"/subscriptions//resourcegroups/cmkregistrytest1117/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cmkregistrytest1117": {
"clientId": "646f5e74-1df4-481b-a01f-8a7834d5ab25",
"principalId": "e926fd96-1b57-4ac5-b39d-ebcfef34cfe5"
}
}
}
```

You see that system-assigned identity was enabled by default without passing [system] in the command.

When I see the debug log, I see that the patch call has an identity type as **"type": "SystemAssigned, UserAssigned"**

My az version is 2.42.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.