System-assigned vs user-assigned managed identity: when do you use each?
IntermediateConceptEntra ID, RBAC and Identities
Answer
| System-assigned | User-assigned | |
|---|---|---|
| Lifecycle | Tied to the resource, deleted with it | Standalone Azure resource |
| Sharing | One resource only | Many resources can use it |
| Pre-provisioning | Exists only after the resource is created | Create first, grant RBAC, then attach |
We prefer user-assigned for anything deployed by IaC: grant roles before the workload exists (no chicken-and-egg), survive resource re-creation without re-granting, and share one identity across VMSS instances or app slots. System-assigned is fine for simple single resources.
More on Entra ID, RBAC and Identities
What is Microsoft Entra ID and how is it different from on-prem Active Directory?BeginnerWhat is the difference between an app registration and a service principal?BeginnerWhat is a managed identity and what problem does it solve?BeginnerHow does Azure RBAC evaluate access?IntermediateName the core built-in roles and the difference between Owner, Contributor and User Access Administrator.BeginnerWhat are `NotActions` and why are they not a deny?Intermediate