Workload identity types: app object vs service principal vs managed identity

Verdict: A user-assigned identity survives recycled compute and attaches to many resources; a system-assigned one dies with its resource. A federated credential removes stored secrets entirely. Permissions are granted to the service principal.

CriterionApp registrationService principalSystem-assigned identityUser-assigned identityFederated credential
What it isApplication object in the home tenantLocal tenant representation that holds permissionsManaged identity tied to one resourceStandalone managed identityTrust that swaps a token for an app token
LifecycleLives in the home tenant onlyCreated per tenant on consentDeleted with its resourceIndependent; deleted explicitlyAttached to an Entra app
Choose whenDefine a multi-tenant app onceGrant roles or API permissionsOne resource, no shared identity neededRecycled scale-set instances need one stable identityA workload must act as an app with no stored secret

Rules

Traps