Microsoft Entra Workload ID
A secretless federation flow that exchanges a Kubernetes service-account token for an Entra access token.
Learning status: Not practiced
The moving parts
Microsoft Entra Workload ID lets a pod authenticate to Entra-protected services without storing a client secret or certificate in the cluster. AKS issues a projected Kubernetes service-account token; Entra trusts that token through OpenID Connect (OIDC) federation and issues an Azure access token.
Requirements
For AKS Standard, enable the OIDC issuer and Workload ID features on the cluster. AKS Automatic has these configured by default. Then configure:
- A Kubernetes service account.
- A user-assigned managed identity or Entra application.
- A federated identity credential on that identity.
- The service-account annotation and required pod-template label.
- Azure RBAC or service-specific permissions on the resource the app needs.
The runtime contract
The AKS workload identity webhook mutates a labeled pod, projecting a token and injecting environment variables. An Azure Identity SDK reads AZURE_FEDERATED_TOKEN_FILE, AZURE_CLIENT_ID, and AZURE_TENANT_ID to obtain a token. The app should use DefaultAzureCredential or WorkloadIdentityCredential.
The projected Kubernetes JWT is an input to token exchange. It is not an Azure access token, and the Kubernetes service account alone grants no Azure resource permissions.
Sources: Workload ID overview, AKS workload identity setup.
Connects to