Lesstep
GitHub Actions · Azure · Checked November 4, 2026

GitHub Actions OIDC to Azure: "AADSTS700213: No matching federated identity record found"

GitHub gave the job a token, and Microsoft Entra ID looked for a federated identity credential on the app registration or managed identity whose subject is exactly the token's sub. None matched. Unlike AWS, Entra prints the subject it received, so the fix is to make a credential that says the same thing, character for character.

What it looks like

Federated token details:
 issuer - https://token.actions.githubusercontent.com
 subject claim - repo:octo-org@123456/octo-repo@456789:environment:dev
 audience - api://AzureADTokenExchange
 job_workflow_ref - octo-org/octo-repo/.github/workflows/deploy.yml@refs/heads/main
...
AADSTS700213: No matching federated identity record found for presented assertion subject 'repo:octo-org@123456/octo-repo@456789:environment:dev'. Check your federated identity credential Subject, Audience and Issuer against the presented assertion.
Error: Login failed with Error: The process '/usr/bin/az' failed with exit code 1. Double check if the 'auth-type' is correct. Refer to https://github.com/Azure/login#readme for more information.

The last line is azure/login passing on the failure of az login. The auth-type it mentions is not the problem here; the subject is. azure/login prints the token's details before it logs in, so the subject is in the log twice.

Which side has the IDs

Compare the subject in the error with the subjects of the credentials:

az ad app federated-credential list --id APP-OBJECT-ID --query "[].{name:name,subject:subject}"

For a user-assigned managed identity, az identity federated-credential list --identity-name NAME --resource-group GROUP. Then:

To see the prefix your repository uses without running a job:

gh api repos/OWNER/REPO/actions/oidc/customization/sub

The answer has use_immutable_subject and sub_claim_prefix, such as repo:octo-org@123456/octo-repo@456789.

Add the credential

From Microsoft's guide Migrate GitHub Actions federated credentials to immutable subjects, for an app registration, with the body in credential.json:

{
  "name": "octo-repo-dev",
  "issuer": "https://token.actions.githubusercontent.com",
  "subject": "repo:octo-org@123456/octo-repo@456789:environment:dev",
  "audiences": ["api://AzureADTokenExchange"]
}
az ad app federated-credential create --id APP-OBJECT-ID --parameters ./credential.json

For a user-assigned managed identity:

az identity federated-credential create --name octo-repo-dev \
  --identity-name NAME --resource-group GROUP \
  --issuer https://token.actions.githubusercontent.com \
  --subject 'repo:octo-org@123456/octo-repo@456789:environment:dev' \
  --audiences api://AzureADTokenExchange

The part after the repository

The job never asked for a token

Without id-token: write there is no token and no AADSTS code. azure/login logs "Failed to fetch federated token from GitHub. Please make sure to give write permissions to id-token in the workflow." and then fails with "Login failed with Error: Error message: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable."

permissions:
  id-token: write
  contents: read

A permissions: block on the job replaces the workflow's for that job, so it needs id-token: write too. Pull requests from forks and reusable workflows have limits of their own: "Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable".

Telling it apart

See failed jobs from IntelliJ IDEA

Pipeline Inbox for GitHub Actions Workflows, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the runs of all your repositories in an IDE tool window, with their jobs and steps, and your current branch's runs are in the status bar. Reading is free; re-running failed jobs, cancelling, running workflows and reviewing deployments are Pro (US$1.50 a month, with a 30-day trial).

GitHub and GitHub Actions are trademarks of GitHub, Inc.; Microsoft Azure and Microsoft Entra are trademarks of Microsoft Corporation; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with, sponsored or endorsed by GitHub, Inc., Microsoft or JetBrains.

More: GitHub Actions OIDC to AWS · Approving a run that is "Waiting" for review · npm publish "ENEEDAUTH" · GitHub Actions plugins for IntelliJ IDEA compared · 日本語