fINTERACTIVE FIELD GUIDES
Tokens and files16 / 30

Projected Service-Account Token

A short-lived Kubernetes-signed JWT projected into a pod for a specific audience; Workload ID exchanges it with Entra.

Learning status: Not practiced

Kubernetes can request a service-account token for a pod with a defined audience and expiration, then project it into the pod as a file. AKS Workload ID uses this mechanism.

The JWT identifies the service account and is signed by the cluster's issuer. Entra validates it through OIDC federation; an Azure Identity client library then exchanges it for an Entra access token.

Important distinctions:

  • The projected JWT is not a Key Vault or Storage access token.
  • Its audience is normally api://AzureADTokenExchange for the Workload ID exchange.
  • Kubernetes refreshes the projected token in place before it expires.
  • Entra access-token lifetime is separate from the Kubernetes token's expiration.
  • Read the file again when exchanging; do not cache its contents for the life of a process.

Pods may also receive the ordinary Kubernetes API service-account token, typically under /var/run/secrets/kubernetes.io/serviceaccount/. That token serves a different audience and purpose.

Sources: Kubernetes service-account token projection, AKS Workload ID overview.