Troubleshooting27 / 30
Workload ID Troubleshooting
Trace authentication from pod mutation through token exchange to target-resource authorization.
Learning status: Not practiced
The moving parts
Follow the flow in order. Change one boundary at a time and avoid printing token values.
| Symptom | Check |
|---|---|
| Azure variables or token file missing | Pod template has azure.workload.identity/use: "true"; pod uses the intended service account; webhook is healthy; inspect the admitted Pod, not only the Deployment |
| Entra rejects the assertion | FIC issuer equals the cluster issuer exactly; subject is system:serviceaccount:<namespace>:<service-account>; audience is api://AzureADTokenExchange |
| Works after delay, fails immediately after setup | FIC propagation can take a short time; retry after propagation |
| SDK reports unsupported credential or missing variables | Use a current Azure Identity package; confirm the pod was mutated and AZURE_FEDERATED_TOKEN_FILE is set |
Token succeeds, Azure API returns 403 | Identity federation succeeded; inspect role assignment, data-plane role, authorization model, and scope on the target resource |
Kubernetes API returns Forbidden | This is Kubernetes control-plane authorization, not Azure data-plane authorization |
| Image pull fails before app starts | Inspect the node's kubelet identity and ACR permissions, not the pod Workload ID |
Useful checks:
kubectl get pod <pod> -n <namespace> -o yaml
kubectl describe pod <pod> -n <namespace>
kubectl get serviceaccount <service-account> -n <namespace> -o yaml
az aks show --resource-group <resource-group> --name <cluster> \
--query oidcIssuerProfile.issuerUrl --output tsv
Do not dump AZURE_FEDERATED_TOKEN_FILE contents into logs, terminals, tickets, or build output.
Sources: AKS Workload ID overview, configure AKS Workload ID.
Connects to