AZ-305 ยท Authentication and identity management
Workload identities: managed identities, service principals and federation
System-assigned vs user-assigned managed identities, service principals and app registrations, workload identity federation for external CI/CD, when to use each.
Key points
- Managed identity: Entra identity for Azure-hosted code, no secret stored.
- System-assigned: on one resource, deleted with it.
- User-assigned: standalone, shared by many resources, authorized before they exist.
- App registration + service principal: own registration or outside Azure.
- Workload identity federation: GitHub Actions, Kubernetes, other clouds; user-assigned identity or app trusts external IdP tokens, no secret.
Source: https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview
Practice questions
Which type of managed identity is deleted automatically when the Azure resource it belongs to is deleted?
- User-assigned managed identity
- App registration with a client secret
- Federated identity credential
- System-assigned managed identity
Show answer
Answer: D. System-assigned managed identity
A system-assigned managed identity shares the lifecycle of its resource, so Azure removes its service principal when the resource is deleted. A user-assigned identity has an independent lifecycle and must be deleted explicitly.
Which statements about workload identity federation in Microsoft Entra ID are true?
- It can be configured on a user-assigned managed identity or an app registration
- It is configured on a system-assigned managed identity
- It lets GitHub Actions or Kubernetes workloads get tokens without secrets
- Issuer, subject and audience must exactly match the external token
- A token issued by Microsoft Entra ID can serve as the external token
Show answer
Answer: A. It can be configured on a user-assigned managed identity or an app registration, C. It lets GitHub Actions or Kubernetes workloads get tokens without secrets, D. Issuer, subject and audience must exactly match the external token
A federated credential can be added to a user-assigned managed identity or an app registration; it supports external workloads such as GitHub Actions, Kubernetes and other clouds; and its issuer, subject and audience must match the incoming token case-sensitively. It is not configured on system-assigned identities, and tokens issued by Microsoft Entra ID itself cannot be used as the external token.
The same user-assigned managed identity can be associated with several Azure resources at once, for example three virtual machines.
Show answer
Answer: True
True. Sharing is exactly what user-assigned identities are for; it is system-assigned identities that are tied to a single resource and cannot be shared.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
