Microsoft Entra Workload ID
Security

Flexible federated identity credentials (preview)

In brief

The documentation now states that GitHub flexible federated identity credentials must match `sub` and at least one immutable claim: `repository_id` or `repository_owner_id`. It also updates examples and operator support details.

What Entra admins need to know

When creating or reviewing GitHub flexible FICs, use `eq` for the supported immutable repository claims to bind trust appropriately.

This editorial summary was generated by AI from the documentation changes. Verify important details in the full Microsoft Learn article.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

Flexible federated identity credentials (preview)

| Operator | The operator portion must be just the operator name, separated from the claim lookup and comparand by a single space | matches | | Comparand | The comparand contains what you intend to compare the claim specified in the lookup against – it must be contained within single quotes | 'repo:contoso/contoso-repo:ref:refs/heads/*' |

Put together, an example GitHub flexible federated identity credentialscredential expression would looklooks like the following JSON object:object. GitHub expressions must match sub and at least one immutable claim:

"claims['sub'] matches 'repo:contoso/contoso-repo:ref:refs/heads/*'. and claims['repository_id'] eq '456789'"

Set up federated identity credentials through Microsoft Graph

Operator Description Example
matches Enables the use of single-character (denoted by ?) and multi-character (denoted by *) wildcard matching for the specified claim "claims['sub'] matches 'repo:contoso/contoso-repo:ref:refs/heads/*' and claims['repository_id'] eq '456789'"
"claims['sub'] matches 'repo:contoso/contoso-repo-*:ref:refs/heads/????' and claims['repository_owner_id'] eq '123456'"
eq Used for explicitly matching against a specified claim "claims['sub'] eq 'repo:contoso/contoso-repo:ref:refs/heads/main' and claims['repository_id'] eq '456789'"
and Boolean operator for combining expressions against multiple claims "claims['sub'] eq 'repo:contoso/contoso-repo:ref:refs/heads/main' and claims['repository_id'] eq '456789' and claims['job_workflow_ref'] matches 'foo-org/bar-repo /.repo/.github/workflows/*@refs/heads/main'"

Issuer URLs, supported claims, and operators by platform

Supported issuer URLs: https://token.actions.githubusercontent.com

For GitHub, a flexible federated identity credential must match the sub claim and one or both of the following immutable claims:

  • repository_id identifies the repository where the workflow runs.
  • repository_owner_id identifies the repository owner.

These claims are required regardless of whether sub uses a name-based, customized, or immutable format. Use repository_id to bind the credential to a repository. Also match repository_owner_id when the repository must remain with a specific owner.

Supported claims and operators per claim:

  • Claim sub supports operators eq and matches.
  • Claim job_workflow_ref supports operators eq and matches.
  • Claim repository_id supports operator eq.
  • Claim repository_owner_id supports operator eq.

GitLab

az rest --method post \
    --url https://graph.microsoft.com/beta/applications/{objectId}/federatedIdentityCredentials
    --body "{'name': 'FlexFic1', 'issuer': 'https://token.actions.githubusercontent.com', 'audiences': ['api://AzureADTokenExchange'], 'claimsMatchingExpression': {'value': 'claims[\'sub\'] matches \'repo:contoso/contoso-org:repo:ref:refs/heads/*\' and claims[\'repository_id\'] eq \'456789\'', 'languageVersion': 1}}"

Related content

Daily Entra.News

Get daily email updates

Get a concise summary of the latest Microsoft Entra updates delivered straight to your inbox.

Loading the secure signup form…