Identity Identity operations verified operator-field-manual

Workload identity federation

Workload identity federation is a safer way for software outside Azure, or software running in Kubernetes, to sign in to Azure without keeping a client secret. Instead of storing a password-like secret in a pipeline, pod, or runner, the workload presents a short-lived token from a trusted issuer. Microsoft Entra checks that token against a federated credential you configured. If the issuer, subject, and audience match, the workload receives an access token for Azure resources.

Aliases
Federated workload identity, OIDC federation for workloads, Federated identity credential, Secretless workload authentication
Difficulty
fundamentals
CLI mappings
5
Last verified
2026-05-29

Microsoft Learn

Workload identity federation lets an external workload exchange a trusted token for Microsoft Entra access tokens without storing long-lived secrets. Microsoft Entra validates the issuer, subject, and audience in a federated credential, then allows automation such as GitHub Actions, Kubernetes, or other platforms to access protected resources.

Microsoft Learn: Workload Identity Federation - Microsoft Entra2026-05-29

Technical context

Technically, workload identity federation sits in Microsoft Entra Workload ID, app registration, service principal, and user-assigned managed identity design. The external platform is the token issuer, such as GitHub, AKS OIDC, or another supported identity provider. Azure stores a federated identity credential containing issuer, subject, and audience rules. RBAC still controls what the principal can do after authentication. The pattern connects identity, CI/CD, Kubernetes, control-plane automation, and data-plane access without persistent shared secrets. Audit scope matters. OIDC metadata becomes a production dependency. Document ownership clearly. for auditable runtime access. This boundary should be documented. clearly.

Why it matters

Workload identity federation matters because cloud automation often becomes more powerful than human users. A deployment pipeline can change infrastructure, a pod can read customer data, and a runner can publish artifacts. If those workloads rely on long-lived client secrets, one leaked value can remain useful until rotation or revocation. Federation narrows that risk by requiring a valid token from a specific issuer and subject at sign-in time. It also improves auditability because each workload trust can be tied to a repository, branch, service account, or environment rather than a vague shared secret. That precision reduces emergency rotations and failed release windows. It also gives incident responders a cleaner shutdown point during credential compromise.

Where you see it

Signals, screens, and Azure surfaces where this term usually becomes operational.

Signal 01

In Microsoft Entra app registrations or managed identities, federated credentials show issuer, subject, audience, name, and the external workload that can request Azure tokens during automation.

Signal 02

In GitHub Actions, AKS, or SPIFFE configuration, operators see OIDC issuer values, service account subjects, environment claims, audience settings, and token exchange behavior for deployments.

Signal 03

In Azure RBAC and sign-in logs, the federated workload appears as an application or managed identity accessing resources without a client secret during automation runs.

When this becomes relevant

Specific situations where this term helps solve real Azure design, operations, migration, security, reliability, cost, or governance problems.

  • Replace client secrets in GitHub Actions, Azure DevOps, or other deployment pipelines with short-lived OIDC token exchange.
  • Let AKS pods read Key Vault, Storage, or Cosmos DB using service-account identity instead of Kubernetes secrets.
  • Separate production, staging, and pull-request deployment identities by repository, branch, environment, or Kubernetes namespace subject.
  • Reduce audit findings from expired, shared, or unowned service principal secrets used by unattended automation.
  • Allow non-Azure automation platforms to deploy Azure resources without copying long-lived credentials into runner variables.

Real-world case studies

Different enterprise-style examples that show the term being used to hit measurable objectives.

Case study 01

Legal discovery SaaS removes deployment secrets from GitHub Actions

A legal discovery SaaS deployed customer-isolated Azure environments from GitHub Actions. Eight repository secrets granted Contributor access to production subs

Scenario

A legal discovery SaaS deployed customer-isolated Azure environments from GitHub Actions. Eight repository secrets granted Contributor access to production subscriptions, and two had not been rotated in more than a year.

Business/Technical Objectives
  • Remove long-lived Azure client secrets from deployment pipelines.
  • Limit production deployment trust to protected release branches and approved environments.
  • Give auditors evidence that each pipeline identity had a clear owner.
  • Reduce emergency credential rotation work after staff changes.
Solution Using Workload identity federation

The platform team created a dedicated app registration for release automation and configured workload identity federation for GitHub Actions. The federated credential pinned the issuer to GitHub, the subject to the protected production environment, and the audience to Azure token exchange. Azure RBAC granted the service principal Deployment Stack and resource group permissions only where the pipeline deployed customer infrastructure. Pull-request workflows received a separate nonproduction credential. CLI scripts listed federated credentials, role assignments, app owners, and recent sign-ins during every quarterly access review.

Results & Business Impact
  • Stored Azure secrets in GitHub fell from eight to zero across production repositories.
  • Emergency rotation time after staff departures dropped from four hours to under thirty minutes.
  • Two overly broad subscription-level role assignments were removed before the next audit.
  • Failed deployment investigations became faster because token exchange, RBAC, and pipeline environment data were reviewed together.
Key Takeaway for Glossary Readers

Workload identity federation turns a deployment pipeline from a secret holder into a tightly scoped, reviewable trust relationship.

Case study 02

Logistics routing platform protects AKS pod access to shipment data

A logistics routing platform stored Storage and Key Vault credentials as Kubernetes secrets in six AKS clusters. A namespace admin could accidentally expose cre

Scenario

A logistics routing platform stored Storage and Key Vault credentials as Kubernetes secrets in six AKS clusters. A namespace admin could accidentally expose credentials that worked outside the cluster.

Business/Technical Objectives
  • Stop placing storage and vault credentials inside Kubernetes secrets.
  • Map each microservice to its own Azure identity and least-privilege role.
  • Keep shipment ingestion running during weekly cluster upgrades.
  • Create a repeatable pattern for new routing services.
Solution Using Workload identity federation

Engineers enabled AKS OIDC issuer and Microsoft Entra Workload ID on each cluster. Every service account received annotations that mapped it to a user-assigned managed identity through a federated credential. The ingestion service could write to raw shipment containers, the routing service could read maps and configuration from Key Vault, and the notification service could publish to a queue. CLI checks compared service account subjects, federated credentials, and RBAC scopes before each cluster upgrade. Developers removed static keys from Helm charts and added token acquisition tests to readiness probes.

Results & Business Impact
  • Kubernetes secrets containing Azure credentials were eliminated from all six clusters.
  • A failed namespace copy in staging no longer granted access to production shipment containers.
  • Upgrade-related identity incidents dropped from three in one quarter to zero in the next.
  • New service onboarding time fell from two days to four hours because the federation pattern was scripted.
Key Takeaway for Glossary Readers

For AKS workloads, federation protects Azure access by binding a pod identity to a specific service account instead of a portable secret.

Case study 03

Climate research consortium connects external runners without shared credentials

A climate research consortium used self-hosted runners in university data centers to publish model outputs to Azure Storage. Shared client secrets were copied i

Scenario

A climate research consortium used self-hosted runners in university data centers to publish model outputs to Azure Storage. Shared client secrets were copied into runner variables at five institutions.

Business/Technical Objectives
  • Allow non-Azure runners to publish approved outputs without shared secrets.
  • Restrict each institution to its own landing container and upload identity.
  • Preserve evidence for grant compliance and data stewardship reviews.
  • Reduce failed uploads caused by expired service principal secrets.
Solution Using Workload identity federation

The cloud team registered one Microsoft Entra application per institution and configured workload identity federation with the external OIDC issuer used by the runner platform. Each federated credential used a subject tied to the institution, repository, and release workflow. Azure RBAC granted Storage Blob Data Contributor only on that institution’s landing container. The publishing script used federated token login, then uploaded files with checksums and tags. Monthly CLI exports captured credential definitions, role assignments, storage scopes, and sign-in failures for the program office.

Results & Business Impact
  • Five copied client secrets were retired without interrupting weekly model publishing.
  • Expired-secret upload failures went from seven incidents per semester to none.
  • One institution’s misconfigured runner could not write outside its assigned landing container.
  • Compliance evidence assembly time dropped from three days to half a day per grant review.
Key Takeaway for Glossary Readers

Federation is especially valuable when trusted automation lives outside Azure but still needs accountable, least-privilege access to Azure resources.

Why use Azure CLI for this?

I use Azure CLI for workload identity federation because the portal makes it too easy to miss the full chain. After ten years of Azure work, I want one repeatable script that lists the federated credential, app or managed identity object, principal ID, role assignments, and sign-in evidence together. CLI output gives reviewers the issuer, subject, audience, and scope instead of a screenshot. It also makes drift detection practical across repositories, clusters, and subscriptions. When federation breaks, command output quickly separates trust configuration, RBAC, tenant context, and external token problems, which keeps emergency fixes honest and reviewable during production incidents.

CLI use cases

  • List federated credentials on app registrations and user-assigned managed identities during access reviews.
  • Create a federated credential from a checked-in JSON file so issuer, subject, and audience are peer reviewed.
  • Export RBAC assignments for the workload principal and confirm the scope is not broader than the pipeline needs.
  • Compare staging and production federated credentials to detect subject drift before a release window.
  • Delete unused federation trusts after a repository, cluster namespace, or external runner pool is retired.

Before you run CLI

  • Confirm tenant, subscription, app ID, managed identity name, issuer URL, subject, audience, and expected resource scope before changing trust.
  • Check whether the workload uses an app registration or a user-assigned managed identity, because the CLI command group differs.
  • Use least-privilege directory and RBAC permissions; creating federation is sensitive because it can grant secretless production access.
  • Verify the external platform owner approved the issuer and subject values, especially for wildcard branches, namespaces, or repositories.
  • Choose JSON output for evidence and table output for human review, but protect exported values that reveal deployment topology.

What output tells you

  • Issuer, subject, and audience values show which external token is trusted and whether the trust is narrowly or broadly scoped.
  • The app ID, object ID, client ID, and principal ID help connect the federated credential to Azure RBAC and sign-in records.
  • Role assignment output shows exactly what the workload can do and whether inheritance grants access beyond the intended resource.
  • A missing federated credential usually means the workload cannot exchange its external token, even if RBAC is configured correctly.
  • Propagation delays, tenant mismatches, and wrong audiences often show up as authentication errors before any Azure authorization decision occurs.

Mapped Azure CLI commands

Workload identity federation CLI commands

direct
az ad app federated-credential list --id <app-id> --output table
az ad app federated-credentialdiscoverIdentity
az ad app federated-credential create --id <app-id> --parameters @federated-credential.json
az ad app federated-credentialsecureIdentity
az identity federated-credential list --identity-name <identity-name> --resource-group <resource-group> --output table
az identity federated-credentialdiscoverIdentity
az identity federated-credential create --name <credential-name> --identity-name <identity-name> --resource-group <resource-group> --issuer <issuer-url> --subject <subject> --audiences api://AzureADTokenExchange
az identity federated-credentialsecureIdentity
az role assignment list --assignee <principal-id> --all --output table
az role assignmentdiscoverIdentity

Architecture context

Architecturally, workload identity federation is a trust bridge between an external execution environment and Microsoft Entra. I design it before granting RBAC, because authentication scope and authorization scope must line up. A good design names the issuer, pins the subject pattern tightly, assigns the least possible Azure role, and keeps environment separation visible. For AKS, it belongs beside OIDC issuer settings, service accounts, user-assigned managed identities, and Key Vault access. For CI/CD, it belongs beside repository protections, branch rules, environment approvals, and deployment subscriptions. The pattern reduces secret handling but does not remove the need for ownership, logging, and access review.

Security

Security impact is direct and high. Federation removes stored client secrets, but a weak federated credential can still grant production access to the wrong workload. Avoid broad subjects that allow every branch, namespace, or repository to impersonate the identity. Treat issuer URLs, subjects, audiences, owners, managed identity contributors, and RBAC assignments as security-critical configuration. Review who can modify the external platform, because compromising a repository, service account, or runner can become an Azure access path. Use workload sign-in logs, privileged role reviews, and least-privilege RBAC to keep the trust narrow. Review every change like production firewall access and document approval.

Cost

The feature itself is usually not the billing driver, but it affects cost risk. A federated identity with broad Contributor access can create compute, storage, databases, or networking resources from automation without a human click. Replacing secret rotation projects with federation can also reduce operations effort, outage risk, and audit remediation cost. FinOps teams should connect workload identities to cost centers, tags, deployment scopes, and pipeline owners. Good federation design prevents abandoned automation from continuing to deploy resources after a project ends, a repository is archived, or ownership changes. Standard naming shortens audits, cleanup work, chargeback discussions, and ownership reporting.

Reliability

Reliability improves when teams stop depending on secret expiry dates, manual rotation calendars, and emergency credential changes. Federation still has failure modes: issuer URLs change, subjects do not match, audiences are missing, credentials are deleted, or RBAC lands on the wrong principal. AKS OIDC and managed identity changes can take time to propagate, so rollout scripts need validation and retry windows. Production workflows should test token acquisition before cutover, keep a rollback path for deployments, and monitor sign-in failures separately from application failures. Reliable federation is precise, documented, and tested after platform changes. Include health checks after each credential deployment.

Performance

Runtime performance impact is normally small because token exchange is short-lived and Azure SDKs cache access tokens. The bigger performance benefit is operational speed: secure pipelines can deploy without waiting for secret rotation, vault updates, or manual credential distribution. Performance problems appear when every request fetches a token, pods restart in large waves, issuer metadata is unreachable, or retries hide authentication failures. Operators should measure token acquisition failures, pipeline start time, pod initialization time, and downstream API latency separately. Federation should be nearly invisible during normal execution and very visible during diagnostics. Cache tokens through supported SDKs, not custom loops.

Operations

Operators manage workload identity federation through Entra app registrations, user-assigned managed identities, federated credential records, Azure RBAC, pipeline definitions, Kubernetes service accounts, and sign-in logs. Day-two work includes listing credentials, confirming owners, removing unused trusts, validating branch or namespace subjects, and proving that each credential maps to a real workload. During incidents, responders should capture the external issuer, subject, principal ID, role assignments, and recent token-exchange failures before changing access. Change control needs peer review because a small subject edit can widen production access silently. Keep credential owners, review cadence, rollback steps, and production approval evidence documented in the same runbook.

Common mistakes

  • Using a broad subject pattern that lets every branch, repository, namespace, or service account impersonate a production identity.
  • Granting Contributor at subscription scope when the workload only needs one resource group, Key Vault, or deployment target.
  • Creating the federated credential on an app registration while the workload actually uses a user-assigned managed identity.
  • Forgetting that repository administrators, cluster administrators, or runner administrators can indirectly influence Azure access.
  • Troubleshooting only RBAC when the real failure is an issuer, subject, audience, or tenant mismatch during token exchange.