Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

GitHub Actions can authenticate to Microsoft Entra without storing a long-lived client secret or certificate in GitHub by using workload identity federation. But that standard flow does not, by itself, prove that a workflow can mint a specialized Microsoft Entra Agent ID token. Microsoft documents Agent ID as a separate, two-stage identity flow, and the available documentation does not establish a complete GitHub Actions recipe that joins the two.

What GitHub Actions can do with Entra federation

In the standard workload identity federation flow, a GitHub Actions job requests an OpenID Connect (OIDC) token from GitHub. Microsoft Entra validates the token against a federated identity credential configured for the workflow, then issues an access token for the Entra identity. That access token can be used only for resources and permissions authorized for that identity. Microsoft’s workload identity federation documentation describes this exchange.

This avoids putting a long-lived client secret or certificate in GitHub. It does not mean that no credentials or configuration exist: Entra retains the identity and trust configuration, the workflow contains identifiers and permissions, and the GitHub assertion and Entra access token exist temporarily while the job runs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why an ordinary access token is not necessarily an Agent ID token

“Entra Agent Token” can refer to a specialized token associated with Microsoft Entra Agent ID, but a regular workload federation access token should not be described as one. Microsoft’s autonomous Agent ID guidance describes a separate sequence: first acquire a token for an agent identity blueprint, then use it to request a token for the agent identity. That flow requires an agent identity blueprint, an agent identity client ID, and appropriate resource permissions. See Microsoft’s Agent ID authentication documentation and the agent identity blueprint guidance.

The documented GitHub federation flow and the documented Agent ID flow do not, in the sources cited here, amount to a Microsoft-endorsed, end-to-end GitHub Actions implementation for minting an Agent ID token. Do not assume that an ordinary GitHub OIDC-to-Entra exchange automatically produces the specialized Agent ID token or that its assertion can be wired into the Agent ID flow without confirming current Microsoft support and SDK behavior.

Set up standard GitHub-to-Entra federation

  1. Choose the Entra identity type for the task. For a standard Azure deployment, Microsoft documents an app registration/service principal or a user-assigned managed identity. Agent ID uses an agent identity blueprint and an agent identity; do not substitute one identity type for another without verifying the intended token flow. See Microsoft’s GitHub Actions connection guidance.
  2. Create a federated identity credential for the exact GitHub context. The documented GitHub issuer is https://token.actions.githubusercontent.com. Configure the credential’s issuer, subject, and audience to match the token GitHub supplies. The subject can be constrained to an organization and repository and a context such as an environment, branch, pull request, or tag. These values are case-sensitive. Standard branch and tag pattern matching is not supported. See Microsoft’s federation setup documentation.
  3. Allow only the required job to request an OIDC token. In the workflow permissions, grant id-token: write to the job that needs federation. This lets the job request an OIDC token; it does not grant access to Azure or Microsoft Graph by itself. Microsoft’s Power Platform example also grants contents: read where needed: Power Platform GitHub Actions tutorial.
  4. Authorize the Entra identity separately. Assign the identity the least resource access needed for the job. Azure Login prerequisites include assigning an appropriate role. Agent ID autonomous access has its own application permission and administrator-consent requirements. Authentication establishes who the job is; authorization determines what that identity can do.
  5. Request and use tokens at runtime. Use a supported action, library, or documented flow for the selected identity type. Do not print the GitHub OIDC assertion or Entra access token to workflow logs; treat both as short-lived credentials while they are present in the job process.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Constrain the trust and account for subject changes

A federated credential is only as restrictive as its subject and the permissions of the trusted identity. Bind trust to the narrowest suitable repository and workflow context, then grant only the required resource permissions. GitHub’s original name-based subjects can be affected by repository or owner renames, transfers, or reuse: Microsoft warns about subject recycling and documents migration to immutable subjects in its federation guidance.

Microsoft also documents flexible federated credentials that can match immutable repository and owner IDs. The cited Microsoft page identifies this feature as preview, so check its current availability and API behavior before making it a production dependency. See Microsoft’s GitHub trust-configuration guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What “no secret, no certificate, nothing stored” gets wrong

  • No long-lived client secret or certificate in GitHub: that is the useful, accurate claim for standard workload identity federation.
  • Persistent configuration still exists: Entra stores the identity and federated trust; the workflow retains the identifiers and permissions needed to request and use a token.
  • Tokens still exist during execution: GitHub’s OIDC assertion and the resulting Entra access token are temporary credentials, not a guarantee of zero credential material.
  • Agent ID is a separate claim: standard federation documentation alone does not establish that the resulting access token is an Agent ID token.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.