DevOps CI/CD security verified

OIDC federation

OIDC federation lets a workload prove who it is without storing a client secret. A CI/CD job, Kubernetes pod, or external platform receives a signed token from its own identity provider, and Microsoft Entra trusts that token only when issuer, subject, and audience match a configured federated identity credential. In Azure operations, this is a safer way to let automation deploy, read secrets, or call APIs without leaving reusable passwords in pipelines. That improves auditability.

Aliases
OpenID Connect federation, workload identity federation, federated identity credential, secretless CI/CD authentication
Difficulty
fundamentals
CLI mappings
5
Last verified
2026-05-17

Microsoft Learn

OIDC federation in Azure uses workload identity federation to let external workloads exchange trusted identity-provider tokens for Microsoft identity platform access tokens. It removes long-lived secrets for supported scenarios such as GitHub Actions, Kubernetes workloads, Azure Pipelines, and other external compute platforms.

Microsoft Learn: Workload identity federation concepts - Microsoft Entra Workload ID2026-05-17

Technical context

Technically, OIDC federation sits in the identity and automation control plane. Microsoft Entra can configure a federated identity credential on an app registration or user-assigned managed identity. The credential defines which external issuer, subject, and audience are trusted. The workload then exchanges an external JWT for an access token from Microsoft identity platform. Azure resources still require RBAC or data-plane permissions. Common integrations include GitHub Actions, Azure Pipelines service connections, AKS workload identity, and non-Azure Kubernetes or cloud platforms.

Why it matters

OIDC federation matters because long-lived secrets are one of the easiest ways for automation to become a breach path. Build agents, repository variables, and deployment scripts often accumulate client secrets that expire, leak, or get copied across environments. Federation replaces that pattern with short-lived tokens tied to a specific issuer and subject, such as one repository branch or Kubernetes service account. The business impact is fewer secret-rotation outages, lower credential exposure, and stronger proof that only the intended workload can request Azure access. It also forces teams to define ownership, scopes, and trust boundaries more clearly. For fast-moving teams, that clarity is often as valuable as removing the secret itself.

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, OIDC federation appears as federated identity credentials with issuer, subject, audience, name, and description during access reviews.

Signal 02

In GitHub Actions, Azure Pipelines, or Kubernetes logs, token exchange failures show issuer, audience, subject, permission, or role-assignment problems during workload migration and release reviews.

Signal 03

In Azure CLI and Microsoft Graph output, federated credentials appear beside app object IDs, client IDs, managed identity IDs, and RBAC assignments during release troubleshooting.

When this becomes relevant

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

  • Let CI/CD pipelines, Kubernetes workloads, or external compute access Azure without stored secrets.
  • Create federated identity credentials that trust exact issuer, subject, and audience claims.
  • Review app registrations, managed identities, and role assignments tied to external workload access.
  • Troubleshoot token exchange failures before they block deployments, automation, or workload startup.

Real-world case studies

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

Case study 01

Removing secrets from streaming-service releases

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

WaveFrame Media deployed encoding services from GitHub Actions into Azure App Service and Container Apps. Several repositories stored client secrets that were hard to rotate before major content launches.

Business/Technical Objectives
  • Eliminate long-lived Azure deployment secrets from repositories.
  • Restrict production deployment trust to protected environments.
  • Reduce release failures caused by expired credentials.
  • Create auditable mappings between repositories and Azure roles.
Solution Using OIDC federation

The platform team created a separate app registration for each deployment environment and configured federated identity credentials with GitHub issuer, protected-environment subject, and expected audience. Azure CLI listed existing secrets, exported role assignments, and verified that each app registration had only the required resource-group scope. GitHub environments required approval before production token exchange. Pipelines used OIDC login instead of secret variables, and a preflight step printed nonsecret identifiers so operators could confirm tenant, client ID, and target scope. Release engineers rehearsed the first production cutover with a noncritical service.

Results & Business Impact
  • Repository-held deployment secrets were removed from twelve services.
  • Credential-expiry release failures dropped to zero over two launch cycles.
  • Production role assignments were reduced from subscription to resource-group scope.
  • Security review time for each new service fell from two days to four hours.
Key Takeaway for Glossary Readers

OIDC federation makes CI/CD access safer when trust subjects and Azure role scopes are both tightly defined.

Case study 02

Federating on-premises robot telemetry workloads

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

MechaWorks Automation ran Kubernetes clusters inside factories to upload robot telemetry into Azure Event Hubs. Local secrets were copied during maintenance windows and sometimes remained after retired lines shut down.

Business/Technical Objectives
  • Remove static Azure credentials from factory clusters.
  • Trust only approved namespace and service-account subjects.
  • Limit upload permissions to telemetry resources.
  • Simplify cluster retirement and credential cleanup.
Solution Using OIDC federation

Identity engineers configured workload identity federation from the factory identity provider to a user-assigned managed identity in Microsoft Entra. Each federated credential matched a specific issuer, namespace, service account, and audience. Azure CLI listed managed identity federated credentials and role assignments, proving the identity could send telemetry but not manage infrastructure. Cluster admission rules prevented unauthorized service accounts from using the trusted subject. Retirement runbooks removed the federated credential before decommissioning a production line. Factory support teams received a checklist for validating trust before replacing local maintenance hardware across every connected production line during night shifts safely.

Results & Business Impact
  • Static Azure secrets were removed from eighteen factory namespaces.
  • Telemetry upload failures from expired credentials fell by 93 percent.
  • Retired production-line cleanup time dropped from three hours to forty minutes.
  • RBAC review confirmed no infrastructure-management rights on upload identities.
Key Takeaway for Glossary Readers

OIDC federation helps external Kubernetes workloads access Azure cleanly when subject design matches the workload boundary.

Case study 03

Modernizing Azure Pipelines service connections

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

BriefSpring Legal managed dozens of Azure Pipelines service connections for document-review products. Secret rotation required weekend change windows because failed renewals could stop customer-facing deployments.

Business/Technical Objectives
  • Replace expiring service-connection secrets with federation.
  • Keep deployment identities separate by product and environment.
  • Shorten release-readiness checks before monthly updates.
  • Improve evidence for customer security questionnaires.
Solution Using OIDC federation

DevOps engineers converted selected Azure Resource Manager service connections to workload identity federation and mapped each connection to a dedicated app registration. Azure CLI and Microsoft Entra exports captured federated credential names, app object IDs, client IDs, and RBAC scopes. Pipelines were updated to fail early if the expected connection, tenant, or resource group did not match. The team kept one tested emergency connection during migration, then removed legacy secrets after two successful production release cycles. Release managers compared old and new service-connection behavior during a full staging deployment rehearsal. The final migration report listed each retired secret, owner, service connection, app object ID, and rollback contact for customer approval evidence.

Results & Business Impact
  • Thirty-one expiring service-connection secrets were retired.
  • Monthly release-readiness checks shrank from one day to three hours.
  • Environment-specific identities reduced accidental cross-product deployment risk.
  • Security questionnaire evidence reused a standardized federation export.
Key Takeaway for Glossary Readers

OIDC federation reduces CI/CD maintenance burden while making deployment identity ownership easier to prove.

Why use Azure CLI for this?

Azure CLI is useful for OIDC federation because trust settings and role assignments often span Microsoft Entra, managed identities, subscriptions, and CI/CD systems. Portal checks are easy to miss. CLI can list credentials, create controlled entries, compare subjects, export evidence, and validate that the federated identity maps to the intended Azure permission scope.

CLI use cases

  • List federated credentials on an app registration or managed identity before removing legacy client secrets.
  • Create a credential for a protected repository, branch, environment, namespace, or service account subject.
  • Compare role assignments for the federated identity to confirm least-privilege deployment scope.
  • Export issuer, subject, audience, object ID, client ID, and RBAC evidence for security review.

Before you run CLI

  • Confirm tenant, subscription, app registration or managed identity, object ID, client ID, issuer, subject, audience, and target RBAC scope.
  • Use read-only list and show commands first; deleting or changing a federated credential can stop deployments or workload startup immediately.
  • Check whether your account can update application credentials or managed identity federation settings, and whether provider registration is ready.
  • Use JSON output for review evidence, and avoid broad subjects that trust every branch, environment, namespace, or repository workflow.

What output tells you

  • Issuer, subject, and audience values define the exact external token that Microsoft Entra will trust for token exchange.
  • Application object ID, client ID, and managed identity resource ID show which Azure identity receives the exchanged access token.
  • RBAC assignment scope reveals what the federated workload can actually do after authentication succeeds.
  • Created timestamps, credential names, and descriptions help reviewers identify stale credentials tied to retired pipelines, clusters, or repositories.

Mapped Azure CLI commands

OIDC federation operator commands

operator-workflow
az ad app federated-credential list --id <application-id>
az ad app federated-credentialdiscoverDevOps
az ad app federated-credential create --id <application-id> --parameters credential.json
az ad app federated-credentialsecureDevOps
az identity federated-credential list --identity-name <identity-name> --resource-group <resource-group>
az identity federated-credentialdiscoverDevOps
az identity federated-credential create --identity-name <identity-name> --resource-group <resource-group> --name <credential-name> --issuer <issuer> --subject <subject> --audience api://AzureADTokenExchange
az identity federated-credentialsecureDevOps
az role assignment list --assignee <principal-id> --all --output table
az role assignmentdiscoverIdentity

Architecture context

Technically, OIDC federation sits in the identity and automation control plane. Microsoft Entra can configure a federated identity credential on an app registration or user-assigned managed identity. The credential defines which external issuer, subject, and audience are trusted. The workload then exchanges an external JWT for an access token from Microsoft identity platform. Azure resources still require RBAC or data-plane permissions. Common integrations include GitHub Actions, Azure Pipelines service connections, AKS workload identity, and non-Azure Kubernetes or cloud platforms.

Security

Security impact is direct and high. OIDC federation removes stored client secrets, but it does not remove the need for least privilege. The federated identity credential must match issuer, subject, and audience case-sensitively, and the resulting app or managed identity still needs appropriate Azure RBAC or data-plane roles. Risk appears when subjects are too broad, repository environments are not protected, managed identities receive subscription-wide access, or external identity providers are poorly governed. Secure designs restrict branches, environments, namespaces, and service accounts; separate identities by workload; monitor token exchange failures; review federated credentials regularly; and keep privileged role assignments out of general deployment identities.

Cost

OIDC federation has no direct Azure billing meter, but it reduces operational cost by removing secret storage, rotation, emergency renewal, and incident response work. The indirect cost risk comes from misconfigured access: an overprivileged federated identity can deploy costly resources, leave environments running, or change production settings too broadly. Failed token exchange can also delay release windows and consume engineer time. FinOps owners should treat federated identities like automation cost boundaries, tagging role assignments and service connections with owners and environments. Reviews should connect each credential to a workload, allowed scope, deployment frequency, and cleanup plan for retired repositories or clusters.

Reliability

Reliability impact is strong because authentication failures can stop every deployment or workload startup that depends on federation. A changed repository name, branch rule, Kubernetes service account, issuer URL, or audience value can break token exchange immediately. External identity-provider outages also affect the path. Reliable designs use separate credentials for environments, clear rollback identities, protected branch and environment policies, and runbook checks that validate issuer, subject, audience, app object, managed identity, and role assignment. Monitoring should distinguish token exchange failure from Azure RBAC denial. Teams should test federation after pipeline, cluster, tenant, or identity changes. Preflight checks should run before important release windows.

Performance

Runtime performance impact is usually indirect. Federation adds a token exchange step, but the cost is small compared with build, deploy, or application startup work. Operational performance improves when teams no longer pause releases to rotate expired secrets or search for leaked credentials. Performance risk appears when pipelines repeatedly fail token exchange, workloads retry aggressively, or scripts query Microsoft Graph and Azure RBAC inefficiently during every run. Operators should cache nonsecret identifiers, validate federation during preflight checks, and monitor authentication duration and failure rate. The goal is faster, safer automation with fewer credential-maintenance bottlenecks. That keeps release automation responsive without weakening the trust model.

Operations

Operators manage OIDC federation by listing federated identity credentials, checking issuer and subject patterns, validating role assignments, and reviewing pipeline or workload logs. Day-to-day work includes onboarding new repositories, rotating away from secrets, troubleshooting token exchange errors, and proving which workload owns Azure access. Azure CLI can inspect app registrations, user-assigned managed identities, federated credentials, and RBAC scope. Good runbooks record tenant, app object ID, client ID, managed identity resource ID, issuer URL, subject, audience, repository or service account, environment protection, role assignments, and the expected failure mode if trust is removed. Operators should keep examples for successful and failed token exchange paths.

Common mistakes

  • Creating a federated credential but forgetting to grant the resulting identity Azure RBAC or data-plane access.
  • Using a broad subject that trusts too many branches, environments, service accounts, or repositories.
  • Confusing application client ID, application object ID, service principal object ID, and managed identity principal ID in scripts.
  • Removing a client secret before testing federation in the exact pipeline, branch, environment, or cluster that production uses.