L4. Managed Identities & Workload IDs
Course outlineLesson 4 of 18
How do Azure workloads authenticate without passwords? Managed identities eliminate secrets for Azure-to-Azure calls. Federated credentials extend this to GitHub Actions and Kubernetes. Know the difference for the exam.
Exam update: AZ-500 retired August 31, 2026. Continue current cloud and AI security study in the SC-500 course.
The Problem: Service Account Sprawl
Historically, applications needed service principal credentials (client ID plus secret) to authenticate to Azure services. Secrets expire, get leaked in code, and require manual rotation. Managed identities solve this for workloads running inside Azure.
System-Assigned vs User-Assigned
| Type | Lifecycle | Use Case |
|---|---|---|
| System-assigned | Tied to the resource; deleted when resource is deleted | Single resource that needs identity |
| User-assigned | Independent resource; can be shared across multiple resources | Shared identity for multiple VMs or functions |
How It Works
Azure manages the identity credentials. On Azure VMs, the workload requests tokens from the Instance Metadata Service (IMDS) endpoint at 169.254.169.254. Other Azure hosts expose their own managed identity endpoints or SDK integration. The application still needs token acquisition code or a supported credential library.
The token is a standard OAuth 2.0 JWT bound to the resource's identity. You then assign Azure RBAC roles to the managed identity just like a user.
Federated Identity Credentials
Federated credentials extend the zero-secret model to workloads outside Azure: GitHub Actions, Kubernetes pods (AKS Workload Identity), and other OIDC providers. GitHub Actions example: A federated credential trusts GitHub's OIDC issuer with a subject identifying the permitted repository and branch or environment, and an audience matching the token exchange. A GitHub Actions workflow requests an OIDC token from GitHub, presents it to Entra ID, and receives an Azure access token in return: no secrets in the repo.
Service Principals
A service principal is a workload identity in a tenant. A managed identity is represented by a special service principal; it is not the opposite of a service principal. An application service principal can authenticate with federated credentials, certificates or secrets. Prefer managed identity for supported Azure hosts and federation for supported external workloads; protect and rotate credentials when a credential-based application is required.
References
- Retired AZ-500 study guide
- Managed identity types and service principals
- Workload identity federation
Continue Learning
- ✓System-assigned identity dies with the resource; user-assigned identity is independent and reusable
- ✓Azure VMs acquire tokens through IMDS; other hosts use their supported endpoints or credential libraries
- ✓Assign Azure RBAC roles to a managed identity exactly as you would to a user
- ✓Federated credentials = zero-secret auth for GitHub Actions, AKS pods, and other OIDC providers
- ✓Managed identities are service principals; application service principals can use OIDC federation, certificates or secrets
1. What is the key operational difference between a system-assigned and user-assigned managed identity?
2. A GitHub Actions workflow needs to deploy to Azure without storing credentials as secrets. Which feature enables this?
3. Which statement about managed identities is correct?