{
  "schemaVersion": "1.0",
  "code": "700213",
  "name": null,
  "title": "AADSTS700213: Federated credential subject doesn't match (fix)",
  "url": "https://brambrinkmeier.com/entra/aadsts/700213/",
  "alternates": {
    "markdown": "https://brambrinkmeier.com/entra/aadsts/700213.md",
    "json": "https://brambrinkmeier.com/api/aadsts/700213.json",
    "html": "https://brambrinkmeier.com/entra/aadsts/700213/"
  },
  "description": "AADSTS700213: the external token's subject matches no federated identity credential. GitHub environment vs branch, renames, typos. Fix and KQL.",
  "summary": "AADSTS700213 means a workload sent an external token whose subject matches none of the federated identity credentials on the app or managed identity. Typical causes: a GitHub job that uses an environment while the credential trusts a branch, a renamed repo or service account, or a typo. Microsoft says the same message is also used for issuer and audience mismatches. Low attack value.",
  "inMicrosoftReference": false,
  "unlistedChecked": "2026-10-30",
  "meaningText": "Microsoft's [error code reference](https://learn.microsoft.com/entra/identity-platform/reference-error-codes) doesn't list AADSTS700213 (checked 30 October 2026). Microsoft documents it on other pages.\n\nThe Azure DevOps troubleshooting page:\n\n> **AADSTS700213: No matching federated identity record found for presented assertion subject**\n> No federated credential was created or the subject is not correct.\n\nMicrosoft's breaking-change notice from August 2024 gives the full message template:\n\n> AADSTS700213: No matching federated identity record found for presented assertion subject '{subject}'. Please note that matching is done using a case-sensitive comparison. Check your federated identity credential Subject, Audience, and Issuer against the presented assertion.\n\nIt adds two things that matter. First, `'{subject}'` *\"provides the value of the subject claim contained in the token being sent from the external IdP\"*, so the error tells you what the token said. Second: *\"This error template is also used for case-insensitive failures surrounding `issuer` and `audience` validation.\"* So 700213 doesn't always mean the subject is the problem. Check all three values.\n\nUsers see shorter variants too. A Microsoft Q&A post from April 2025 quoted *\"…presented assertion subject '103432211958501047059'. Check your federated identity credential Subject, Audience and Issuer against the presented assertion.\"* without the case-sensitivity sentence.\n\nBackground: a federated identity credential trusts one subject from one issuer. The subject identifies the workload: a GitHub repo plus branch, environment or pull request; a Kubernetes service account; an Azure DevOps service connection; a Google service account ID. Microsoft's create-trust page: *\"The values must exactly match the configuration\"*.\n\n700213 looks like the subject-specific form of [70021](https://brambrinkmeier.com/entra/aadsts/70021/); Microsoft doesn't say so. Its siblings are [700211](https://brambrinkmeier.com/entra/aadsts/700211/) (issuer) and [700212](https://brambrinkmeier.com/entra/aadsts/700212/) (audience). When the subject is right apart from letter case, the Azure/login README and user reports show [7002138](https://brambrinkmeier.com/entra/aadsts/7002138/) instead. If the app has no federated credentials at all, you get [70025](https://brambrinkmeier.com/entra/aadsts/70025/).",
  "sections": [
    {
      "heading": "What does AADSTS700213 mean?",
      "text": "Microsoft's [error code reference](https://learn.microsoft.com/entra/identity-platform/reference-error-codes) doesn't list AADSTS700213 (checked 30 October 2026). Microsoft documents it on other pages.\n\nThe Azure DevOps troubleshooting page:\n\n> **AADSTS700213: No matching federated identity record found for presented assertion subject**\n> No federated credential was created or the subject is not correct.\n\nMicrosoft's breaking-change notice from August 2024 gives the full message template:\n\n> AADSTS700213: No matching federated identity record found for presented assertion subject '{subject}'. Please note that matching is done using a case-sensitive comparison. Check your federated identity credential Subject, Audience, and Issuer against the presented assertion.\n\nIt adds two things that matter. First, `'{subject}'` *\"provides the value of the subject claim contained in the token being sent from the external IdP\"*, so the error tells you what the token said. Second: *\"This error template is also used for case-insensitive failures surrounding `issuer` and `audience` validation.\"* So 700213 doesn't always mean the subject is the problem. Check all three values.\n\nUsers see shorter variants too. A Microsoft Q&A post from April 2025 quoted *\"…presented assertion subject '103432211958501047059'. Check your federated identity credential Subject, Audience and Issuer against the presented assertion.\"* without the case-sensitivity sentence.\n\nBackground: a federated identity credential trusts one subject from one issuer. The subject identifies the workload: a GitHub repo plus branch, environment or pull request; a Kubernetes service account; an Azure DevOps service connection; a Google service account ID. Microsoft's create-trust page: *\"The values must exactly match the configuration\"*.\n\n700213 looks like the subject-specific form of [70021](https://brambrinkmeier.com/entra/aadsts/70021/); Microsoft doesn't say so. Its siblings are [700211](https://brambrinkmeier.com/entra/aadsts/700211/) (issuer) and [700212](https://brambrinkmeier.com/entra/aadsts/700212/) (audience). When the subject is right apart from letter case, the Azure/login README and user reports show [7002138](https://brambrinkmeier.com/entra/aadsts/7002138/) instead. If the app has no federated credentials at all, you get [70025](https://brambrinkmeier.com/entra/aadsts/70025/)."
    },
    {
      "heading": "Reproduced in the lab",
      "text": "On 30 October 2026 an automated lab run set this up in my own tenant: one app registration presents its access token as a client assertion, and a second app carries the federated identity credential that is supposed to accept it. With the credential's **subject** set to a value the token doesn't carry, Entra returned `AADSTS700213`:\n\n> AADSTS700213: No matching federated identity record found for presented assertion subject '<subject>'.\n\nAs with the issuer, the subject printed is the one from the token. Copy it from the message into the credential rather than typing it out.\n\nThe sign-in log row isn't captured yet; see [how pages are checked](https://brambrinkmeier.com/methodology/)."
    },
    {
      "heading": "Is it an attack?",
      "text": "No. It is almost always a subject that doesn't match.\n\n| Pattern | Likely meaning |\n|---|---|\n| GitHub: the subject in the error ends in `:environment:<name>` but the credential trusts a branch | The job declares an `environment`. Microsoft's create-trust page uses `repo:<org>/<repo>:environment:<name>` for jobs tied to an environment, and `:ref:<ref path>` only for jobs that aren't. A Q&A post shows exactly this mismatch (it has no answer). |\n| GitHub: the credential was made in the portal and includes `@<number>` after the org or repo | The Azure/login README: portal subjects of the form `repo:<org>@<org-id>/<repo>@<repo-id>:...` never match, because *\"The OIDC token GitHub sends does **not** include those numeric IDs\"*. |\n| GitHub: one credential per branch, and a new branch, tag or pull request fails | Microsoft: *\"Pattern matching isn't supported for branches and tags.\"* Each one needs its own credential, or a flexible credential (preview, below). |\n| Azure DevOps: worked before, fails after a rename | Microsoft lists renaming the organization, project or service connection as a cause, for the `sc://` subject. |\n| The subject looks identical | Look for an invisible difference. In the April 2025 Q&A case above, a moderator reported that a trailing full stop in the credential's subject was the cause. Letter case gives [7002138](https://brambrinkmeier.com/entra/aadsts/7002138/). |\n| Failures for your app with a subject from a repo or account you don't own | Someone presenting their own token with your app's client ID. Our reading: it fails because nothing trusts that subject. Check, but it is not an incident on its own. |"
    },
    {
      "heading": "How do I find it in my logs (KQL)?",
      "text": "Microsoft doesn't document which sign-in table 700213 lands in. Our reading: app registration failures land in `AADServicePrincipalSignInLogs`; a user-assigned managed identity may log in the managed identity sign-in log instead. Check:\n\n```kusto\nunion withsource=SourceTable SigninLogs, AADNonInteractiveUserSignInLogs, AADServicePrincipalSignInLogs\n| where TimeGenerated > ago(30d)\n| where ResultType == \"700213\" or ResultSignature == \"700213\"\n| summarize Rows = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceTable\n```\n\nFailures per app, with the error text. If `ResultDescription` holds the same text as the returned message (our assumption; check a row), it shows the subject the token presented:\n\n```kusto\nAADServicePrincipalSignInLogs\n| where TimeGenerated > ago(7d)\n| where ResultType == \"700213\" or ResultSignature == \"700213\"\n| summarize Failures = count(),\n            FirstSeen = min(TimeGenerated),\n            LastSeen = max(TimeGenerated),\n            Descriptions = make_set(ResultDescription, 5),\n            IPs = make_set(IPAddress, 10)\n          by AppId, ServicePrincipalName\n| sort by Failures desc\n```\n\nFor an app that worked before, check whether its federated credentials were changed. A third-party write-up (trackr.live) reports this logs as `Update application` with a modified property `FederatedIdentityCredentials`; Microsoft doesn't document that name on the pages we checked:\n\n```kusto\nAuditLogs\n| where TimeGenerated > ago(30d)\n| where OperationName == \"Update application\"\n| mv-expand Target = TargetResources\n| mv-expand Prop = Target.modifiedProperties\n| where tostring(Prop.displayName) == \"FederatedIdentityCredentials\"\n| project TimeGenerated,\n          App = tostring(Target.displayName),\n          Actor = coalesce(tostring(InitiatedBy.user.userPrincipalName), tostring(InitiatedBy.app.displayName)),\n          OldValue = tostring(Prop.oldValue),\n          NewValue = tostring(Prop.newValue)\n```"
    },
    {
      "heading": "How do I fix AADSTS700213?",
      "text": "**For developers and pipeline owners:**\n1. Copy the subject from the error message. In GitHub Actions, the Azure/login README says the run log shows it under `Federated token details` as `subject claim`.\n2. Set the credential's subject to exactly that string. The README: *\"set the federated credential Subject to exactly match the `subject claim`\"*.\n3. Also compare the issuer and audience, because Microsoft uses this message for those failures too.\n4. GitHub: pick the entity type that matches the job. A job with `environment:` needs an **Environment** credential. A job without one needs **Branch** or **Tag** with the exact ref. Pull request runs need `repo:<org>/<repo>:pull-request`.\n5. Kubernetes: the subject is `system:serviceaccount:<namespace>:<service account>`. A renamed namespace or service account needs a new credential.\n\n**For admins:**\n1. Azure DevOps after a rename: Microsoft names the cause but gives no fix. Update the subject on the identity to the new `sc://` value.\n2. Many branches: an app or user-assigned managed identity holds at most 20 federated credentials, and wildcards aren't supported in ordinary credentials. Microsoft's flexible federated identity credential (preview) uses a `claimsMatchingExpression` such as `claims['sub'] matches 'repo:contoso/contoso-repo:ref:refs/heads/*'` and supports issuers *\"such as GitHub, GitLab, and Terraform Cloud\"*. It is a preview; weigh that before relying on it.\n3. Don't widen trust to make an error go away. A subject that matches more branches or environments than needed would let more workflows act as the app."
    }
  ],
  "microsoftWording": {
    "text": "**AADSTS700213: No matching federated identity record found for presented assertion subject**\nNo federated credential was created or the subject is not correct.",
    "source": "Quoted on the page from the lab or from user reports; the code is not in Microsoft's error code reference",
    "sourceUrl": null
  },
  "securityReading": {
    "category": {
      "id": "app-config",
      "label": "App configuration"
    },
    "kind": {
      "id": "config",
      "label": "Configuration error"
    },
    "attackSignal": {
      "level": "low",
      "label": "Low: usually configuration or user error"
    },
    "mitre": [],
    "tables": [],
    "isItAnAttack": "No. It is almost always a subject that doesn't match.\n\n| Pattern | Likely meaning |\n|---|---|\n| GitHub: the subject in the error ends in `:environment:<name>` but the credential trusts a branch | The job declares an `environment`. Microsoft's create-trust page uses `repo:<org>/<repo>:environment:<name>` for jobs tied to an environment, and `:ref:<ref path>` only for jobs that aren't. A Q&A post shows exactly this mismatch (it has no answer). |\n| GitHub: the credential was made in the portal and includes `@<number>` after the org or repo | The Azure/login README: portal subjects of the form `repo:<org>@<org-id>/<repo>@<repo-id>:...` never match, because *\"The OIDC token GitHub sends does **not** include those numeric IDs\"*. |\n| GitHub: one credential per branch, and a new branch, tag or pull request fails | Microsoft: *\"Pattern matching isn't supported for branches and tags.\"* Each one needs its own credential, or a flexible credential (preview, below). |\n| Azure DevOps: worked before, fails after a rename | Microsoft lists renaming the organization, project or service connection as a cause, for the `sc://` subject. |\n| The subject looks identical | Look for an invisible difference. In the April 2025 Q&A case above, a moderator reported that a trailing full stop in the credential's subject was the cause. Letter case gives [7002138](https://brambrinkmeier.com/entra/aadsts/7002138/). |\n| Failures for your app with a subject from a repo or account you don't own | Someone presenting their own token with your app's client ID. Our reading: it fails because nothing trusts that subject. Check, but it is not an incident on its own. |",
    "conditionalAccess": null
  },
  "kql": [
    {
      "title": null,
      "leadIn": "Microsoft doesn't document which sign-in table 700213 lands in. Our reading: app registration failures land in `AADServicePrincipalSignInLogs`; a user-assigned managed identity may log in the managed identity sign-in log instead. Check:",
      "query": "union withsource=SourceTable SigninLogs, AADNonInteractiveUserSignInLogs, AADServicePrincipalSignInLogs\n| where TimeGenerated > ago(30d)\n| where ResultType == \"700213\" or ResultSignature == \"700213\"\n| summarize Rows = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceTable"
    },
    {
      "title": null,
      "leadIn": "Failures per app, with the error text. If `ResultDescription` holds the same text as the returned message (our assumption; check a row), it shows the subject the token presented:",
      "query": "AADServicePrincipalSignInLogs\n| where TimeGenerated > ago(7d)\n| where ResultType == \"700213\" or ResultSignature == \"700213\"\n| summarize Failures = count(),\n            FirstSeen = min(TimeGenerated),\n            LastSeen = max(TimeGenerated),\n            Descriptions = make_set(ResultDescription, 5),\n            IPs = make_set(IPAddress, 10)\n          by AppId, ServicePrincipalName\n| sort by Failures desc"
    },
    {
      "title": null,
      "leadIn": "For an app that worked before, check whether its federated credentials were changed. A third-party write-up (trackr.live) reports this logs as `Update application` with a modified property `FederatedIdentityCredentials`; Microsoft doesn't document that name on the pages we checked:",
      "query": "AuditLogs\n| where TimeGenerated > ago(30d)\n| where OperationName == \"Update application\"\n| mv-expand Target = TargetResources\n| mv-expand Prop = Target.modifiedProperties\n| where tostring(Prop.displayName) == \"FederatedIdentityCredentials\"\n| project TimeGenerated,\n          App = tostring(Target.displayName),\n          Actor = coalesce(tostring(InitiatedBy.user.userPrincipalName), tostring(InitiatedBy.app.displayName)),\n          OldValue = tostring(Prop.oldValue),\n          NewValue = tostring(Prop.newValue)"
    }
  ],
  "kqlSectionText": "Microsoft doesn't document which sign-in table 700213 lands in. Our reading: app registration failures land in `AADServicePrincipalSignInLogs`; a user-assigned managed identity may log in the managed identity sign-in log instead. Check:\n\n```kusto\nunion withsource=SourceTable SigninLogs, AADNonInteractiveUserSignInLogs, AADServicePrincipalSignInLogs\n| where TimeGenerated > ago(30d)\n| where ResultType == \"700213\" or ResultSignature == \"700213\"\n| summarize Rows = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceTable\n```\n\nFailures per app, with the error text. If `ResultDescription` holds the same text as the returned message (our assumption; check a row), it shows the subject the token presented:\n\n```kusto\nAADServicePrincipalSignInLogs\n| where TimeGenerated > ago(7d)\n| where ResultType == \"700213\" or ResultSignature == \"700213\"\n| summarize Failures = count(),\n            FirstSeen = min(TimeGenerated),\n            LastSeen = max(TimeGenerated),\n            Descriptions = make_set(ResultDescription, 5),\n            IPs = make_set(IPAddress, 10)\n          by AppId, ServicePrincipalName\n| sort by Failures desc\n```\n\nFor an app that worked before, check whether its federated credentials were changed. A third-party write-up (trackr.live) reports this logs as `Update application` with a modified property `FederatedIdentityCredentials`; Microsoft doesn't document that name on the pages we checked:\n\n```kusto\nAuditLogs\n| where TimeGenerated > ago(30d)\n| where OperationName == \"Update application\"\n| mv-expand Target = TargetResources\n| mv-expand Prop = Target.modifiedProperties\n| where tostring(Prop.displayName) == \"FederatedIdentityCredentials\"\n| project TimeGenerated,\n          App = tostring(Target.displayName),\n          Actor = coalesce(tostring(InitiatedBy.user.userPrincipalName), tostring(InitiatedBy.app.displayName)),\n          OldValue = tostring(Prop.oldValue),\n          NewValue = tostring(Prop.newValue)\n```",
  "fix": {
    "short": "Pipeline owner: copy the subject from the error message and set the federated credential's subject to exactly that string. Also compare issuer and audience. GitHub: a job with `environment:` needs an Environment credential. Kubernetes: `system:serviceaccount:<namespace>:<service account>`.",
    "steps": "**For developers and pipeline owners:**\n1. Copy the subject from the error message. In GitHub Actions, the Azure/login README says the run log shows it under `Federated token details` as `subject claim`.\n2. Set the credential's subject to exactly that string. The README: *\"set the federated credential Subject to exactly match the `subject claim`\"*.\n3. Also compare the issuer and audience, because Microsoft uses this message for those failures too.\n4. GitHub: pick the entity type that matches the job. A job with `environment:` needs an **Environment** credential. A job without one needs **Branch** or **Tag** with the exact ref. Pull request runs need `repo:<org>/<repo>:pull-request`.\n5. Kubernetes: the subject is `system:serviceaccount:<namespace>:<service account>`. A renamed namespace or service account needs a new credential.\n\n**For admins:**\n1. Azure DevOps after a rename: Microsoft names the cause but gives no fix. Update the subject on the identity to the new `sc://` value.\n2. Many branches: an app or user-assigned managed identity holds at most 20 federated credentials, and wildcards aren't supported in ordinary credentials. Microsoft's flexible federated identity credential (preview) uses a `claimsMatchingExpression` such as `claims['sub'] matches 'repo:contoso/contoso-repo:ref:refs/heads/*'` and supports issuers *\"such as GitHub, GitLab, and Terraform Cloud\"*. It is a preview; weigh that before relying on it.\n3. Don't widen trust to make an error go away. A subject that matches more branches or environments than needed would let more workflows act as the app."
  },
  "labReproduced": {
    "date": "2026-10-30",
    "method": "Client-credentials token request with a federated identity credential, against a lab tenant",
    "scenario": "Federated credential: subject does not match",
    "message": "AADSTS700213: No matching federated identity record found for presented assertion subject '<subject>'. Check your federated identity credential Subject.",
    "logCaptured": null,
    "kqlTested": null
  },
  "labSectionText": "On 30 October 2026 an automated lab run set this up in my own tenant: one app registration presents its access token as a client assertion, and a second app carries the federated identity credential that is supposed to accept it. With the credential's **subject** set to a value the token doesn't carry, Entra returned `AADSTS700213`:\n\n> AADSTS700213: No matching federated identity record found for presented assertion subject '<subject>'.\n\nAs with the issuer, the subject printed is the one from the token. Copy it from the message into the credential rather than typing it out.\n\nThe sign-in log row isn't captured yet; see [how pages are checked](https://brambrinkmeier.com/methodology/).",
  "labRuns": [
    {
      "date": "2026-10-30",
      "run": "round 5",
      "method": "token-endpoint requests against a lab tenant, using lab-created test apps",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/69",
      "scenario": "Federated credential: subject does not match",
      "expected": "700213 / 70021",
      "got": "700213",
      "matchedExpectation": true,
      "message": "AADSTS700213: No matching federated identity record found for presented assertion subject '{guid}'. Check your federated identity "
    },
    {
      "date": "2026-10-30",
      "run": "round 5",
      "method": "token-endpoint requests against a lab tenant, using lab-created test apps",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/69",
      "scenario": "Federated credential: audience does not match",
      "expected": "700212 / 700213 / 70021",
      "got": "7002121",
      "matchedExpectation": false,
      "message": "AADSTS7002121: No matching federated identity record found for presented assertion audience '{audience-id}'. The Audience for the federat"
    },
    {
      "date": "2026-10-30",
      "run": "round 5",
      "method": "token-endpoint requests against a lab tenant, using lab-created test apps",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/69",
      "scenario": "Federated credential: subject differs only by case",
      "expected": "7002138 / 700213",
      "got": "7002138",
      "matchedExpectation": true,
      "message": "AADSTS7002138: No matching federated identity record found for presented assertion subject '{guid}'. The subject matches with case"
    },
    {
      "date": "2026-10-30",
      "run": "round 6",
      "method": "token-endpoint requests against a lab tenant, using lab-created test apps",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/70",
      "scenario": "Federated credential: subject does not match",
      "expected": "700213 / 70021",
      "got": "700213",
      "matchedExpectation": true,
      "message": "AADSTS700213: No matching federated identity record found for presented assertion subject '{guid}'. Check your federated identity "
    },
    {
      "date": "2026-10-30",
      "run": "round 6",
      "method": "token-endpoint requests against a lab tenant, using lab-created test apps",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/70",
      "scenario": "Federated credential: audience does not match",
      "expected": "700212 / 700213 / 70021",
      "got": "7002121",
      "matchedExpectation": false,
      "message": "AADSTS7002121: No matching federated identity record found for presented assertion audience '{audience-id}'. The Audience for the federat"
    },
    {
      "date": "2026-10-30",
      "run": "round 6",
      "method": "token-endpoint requests against a lab tenant, using lab-created test apps",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/70",
      "scenario": "Federated credential: subject differs only by case",
      "expected": "7002138 / 700213",
      "got": "7002138",
      "matchedExpectation": true,
      "message": "AADSTS7002138: No matching federated identity record found for presented assertion subject '{guid}'. The subject matches with case"
    },
    {
      "date": "2026-10-30",
      "run": "round 7",
      "method": "token-endpoint requests against a lab tenant",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/71",
      "scenario": "Federated credential: subject does not match",
      "expected": "700213 / 70021",
      "got": "700213",
      "matchedExpectation": true,
      "message": "AADSTS700213: No matching federated identity record found for presented assertion subject '{guid}'. Check your federated identity "
    },
    {
      "date": "2026-10-30",
      "run": "round 7",
      "method": "token-endpoint requests against a lab tenant",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/71",
      "scenario": "Federated credential: audience does not match",
      "expected": "700212 / 700213 / 70021",
      "got": "7002121",
      "matchedExpectation": false,
      "message": "AADSTS7002121: No matching federated identity record found for presented assertion audience '{audience-id}'. The Audience for the federat"
    },
    {
      "date": "2026-10-30",
      "run": "round 7",
      "method": "token-endpoint requests against a lab tenant",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/71",
      "scenario": "Federated credential: subject differs only by case",
      "expected": "7002138 / 700213",
      "got": "7002138",
      "matchedExpectation": true,
      "message": "AADSTS7002138: No matching federated identity record found for presented assertion subject '{guid}'. The subject matches with case"
    },
    {
      "date": "2026-10-31",
      "run": "round 8",
      "method": "token-endpoint and device-code requests against a lab tenant",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/72",
      "scenario": "Federated credential: subject does not match",
      "expected": "700213 / 70021",
      "got": "700213",
      "matchedExpectation": true,
      "message": "AADSTS700213: No matching federated identity record found for presented assertion subject '{guid}'. Check your federated identity "
    },
    {
      "date": "2026-10-31",
      "run": "round 8",
      "method": "token-endpoint and device-code requests against a lab tenant",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/72",
      "scenario": "Federated credential: audience does not match",
      "expected": "700212 / 700213 / 70021",
      "got": "7002121",
      "matchedExpectation": false,
      "message": "AADSTS7002121: No matching federated identity record found for presented assertion audience '{audience-id}'. The Audience for the federat"
    },
    {
      "date": "2026-10-31",
      "run": "round 8",
      "method": "token-endpoint and device-code requests against a lab tenant",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/72",
      "scenario": "Federated credential: subject differs only by case",
      "expected": "7002138 / 700213",
      "got": "7002138",
      "matchedExpectation": true,
      "message": "AADSTS7002138: No matching federated identity record found for presented assertion subject '{guid}'. The subject matches with case"
    },
    {
      "date": "2026-10-31",
      "run": "round 9",
      "method": "token-endpoint and device-code requests against a lab tenant",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/73",
      "scenario": "Federated credential: subject does not match",
      "expected": "700213 / 70021",
      "got": "700213",
      "matchedExpectation": true,
      "message": "AADSTS700213: No matching federated identity record found for presented assertion subject '{guid}'. Check your federated identity "
    },
    {
      "date": "2026-10-31",
      "run": "round 9",
      "method": "token-endpoint and device-code requests against a lab tenant",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/73",
      "scenario": "Federated credential: audience does not match",
      "expected": "700212 / 700213 / 70021",
      "got": "7002121",
      "matchedExpectation": false,
      "message": "AADSTS7002121: No matching federated identity record found for presented assertion audience '{audience-id}'. The Audience for the federat"
    },
    {
      "date": "2026-10-31",
      "run": "round 9",
      "method": "token-endpoint and device-code requests against a lab tenant",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/73",
      "scenario": "Federated credential: subject differs only by case",
      "expected": "7002138 / 700213",
      "got": "7002138",
      "matchedExpectation": true,
      "message": "AADSTS7002138: No matching federated identity record found for presented assertion subject '{guid}'. The subject matches with case"
    }
  ],
  "verification": "lab-reproduced",
  "related": [
    "7002138",
    "70021",
    "700211",
    "700212",
    "70025",
    "700226",
    "7002121"
  ],
  "coveredBy": [],
  "sources": [
    {
      "title": "Microsoft Entra authentication and authorization error codes",
      "url": "https://learn.microsoft.com/lb-lu/entra/identity-platform/reference-error-codes"
    },
    {
      "title": "Federated identity credentials and case-sensitive matching (Microsoft Entra breaking changes, August 2024)",
      "url": "https://learn.microsoft.com/en-us/entra/identity-platform/reference-breaking-changes"
    },
    {
      "title": "Troubleshoot an Azure Resource Manager workload identity service connection (Azure DevOps)",
      "url": "https://learn.microsoft.com/en-us/azure/devops/pipelines/release/troubleshoot-workload-identity"
    },
    {
      "title": "Azure/login GitHub Action README",
      "url": "https://github.com/Azure/login#readme"
    },
    {
      "title": "Configure an app to trust an external identity provider",
      "url": "https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation-create-trust"
    },
    {
      "title": "Set up a flexible federated identity credential (preview)",
      "url": "https://learn.microsoft.com/en-us/entra/workload-id/workload-identities-set-up-flexible-federated-identity-credential"
    },
    {
      "title": "azure/login@v2 GitHub Action with federated identity (Microsoft Q&A)",
      "url": "https://learn.microsoft.com/en-us/answers/questions/2074191/azure-login@v2-github-action-with-federated-identi"
    },
    {
      "title": "WIF doesn't work from GCP Composer/Airflow's service account (Microsoft Q&A)",
      "url": "https://learn.microsoft.com/en-gb/answers/questions/2244862/wif-doesnt-work-from-gcp-composer-airflows-service"
    },
    {
      "title": "AADServicePrincipalSignInLogs table reference (Azure Monitor)",
      "url": "https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/aadserviceprincipalsigninlogs"
    },
    {
      "title": "A Federated Identity Credential Adds No Secret (trackr.live, third-party)",
      "url": "https://www.trackr.live/?p=1229"
    }
  ],
  "published": "2026-10-30",
  "lastUpdated": "2026-10-30",
  "lastVerified": null,
  "license": "CC BY 4.0",
  "licenseUrl": "https://creativecommons.org/licenses/by/4.0/",
  "licenseNote": "CC BY 4.0 covers the author's own text and classification fields. Quoted Microsoft error wording belongs to Microsoft, is quoted with its source and can change.",
  "attribution": "Bram Brinkmeier, \"AADSTS700213: Federated credential subject doesn't match (fix)\", https://brambrinkmeier.com/entra/aadsts/700213/ (CC BY 4.0)",
  "microsoftErrorLookup": "https://login.microsoftonline.com/error?code=700213"
}
