Points de terminaison d’API REST pour GitHub Actions OIDC
Utilisez l’API REST pour interagir avec les JWT pour les revendications d’objet OIDC dans GitHub Actions.
À propos de l’OIDC GitHub Actions
Vous pouvez utiliser l’API REST pour interroger et gérer un modèle de personnalisation pour une revendication d’objet OpenID Connect (OIDC). Pour plus d’informations, consultez « OpenID Connect ».
Set the GitHub Actions OIDC custom issuer policy for an enterprise
Sets the GitHub Actions OpenID Connect (OIDC) custom issuer policy for an enterprise.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
Jetons d’accès affinés pour « Set the GitHub Actions OIDC custom issuer policy for an enterprise »
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Enterprise administration" enterprise permissions (write)
Paramètres pour « Set the GitHub Actions OIDC custom issuer policy for an enterprise »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
enterprise string RequisThe slug version of the enterprise name. |
| Nom, Type, Description |
|---|
include_enterprise_slug boolean Whether the enterprise customer requested a custom issuer URL. |
Codes d’état de la réponse HTTP pour « Set the GitHub Actions OIDC custom issuer policy for an enterprise »
| Code de statut | Description |
|---|---|
204 | No Content |
Exemples de code pour « Set the GitHub Actions OIDC custom issuer policy for an enterprise »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/enterprises/ENTERPRISE/actions/oidc/customization/issuer \
-d '{"include_enterprise_slug":true}'Response
Status: 204List OIDC custom property inclusions for an enterprise
Lists the repository custom properties that are included in the OIDC token for repository actions in an enterprise.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
Jetons d’accès affinés pour « List OIDC custom property inclusions for an enterprise »
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Enterprise administration" enterprise permissions (read)
Paramètres pour « List OIDC custom property inclusions for an enterprise »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
enterprise string RequisThe slug version of the enterprise name. |
Codes d’état de la réponse HTTP pour « List OIDC custom property inclusions for an enterprise »
| Code de statut | Description |
|---|---|
200 | A JSON array of OIDC custom property inclusions |
403 | Forbidden |
404 | Resource not found |
Exemples de code pour « List OIDC custom property inclusions for an enterprise »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/enterprises/ENTERPRISE/actions/oidc/customization/properties/repoA JSON array of OIDC custom property inclusions
Status: 200[
{
"custom_property_name": "environment",
"inclusion_source": "enterprise"
},
{
"custom_property_name": "team",
"inclusion_source": "enterprise"
}
]Create an OIDC custom property inclusion for an enterprise
Adds a repository custom property to be included in the OIDC token for repository actions in an enterprise.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
Jetons d’accès affinés pour « Create an OIDC custom property inclusion for an enterprise »
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Enterprise administration" enterprise permissions (write)
Paramètres pour « Create an OIDC custom property inclusion for an enterprise »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
enterprise string RequisThe slug version of the enterprise name. |
| Nom, Type, Description |
|---|
custom_property_name string RequisThe name of the custom property to include in the OIDC token |
Codes d’état de la réponse HTTP pour « Create an OIDC custom property inclusion for an enterprise »
| Code de statut | Description |
|---|---|
201 | OIDC custom property inclusion created |
400 | Invalid input |
403 | Forbidden |
422 | Property inclusion already exists |
Exemples de code pour « Create an OIDC custom property inclusion for an enterprise »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/enterprises/ENTERPRISE/actions/oidc/customization/properties/repo \
-d '{"custom_property_name":"environment"}'OIDC custom property inclusion created
Status: 201{
"custom_property_name": "environment"
}Delete an OIDC custom property inclusion for an enterprise
Removes a repository custom property from being included in the OIDC token for repository actions in an enterprise.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
Jetons d’accès affinés pour « Delete an OIDC custom property inclusion for an enterprise »
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Enterprise administration" enterprise permissions (write)
Paramètres pour « Delete an OIDC custom property inclusion for an enterprise »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
enterprise string RequisThe slug version of the enterprise name. |
custom_property_name string RequisThe name of the custom property to remove from OIDC token inclusion |
Codes d’état de la réponse HTTP pour « Delete an OIDC custom property inclusion for an enterprise »
| Code de statut | Description |
|---|---|
204 | OIDC custom property inclusion deleted |
400 | Invalid input |
403 | Forbidden |
404 | Property inclusion not found |
Exemples de code pour « Delete an OIDC custom property inclusion for an enterprise »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/enterprises/ENTERPRISE/actions/oidc/customization/properties/repo/CUSTOM_PROPERTY_NAMEOIDC custom property inclusion deleted
Status: 204List OIDC custom property inclusions for an organization
Lists the repository custom properties that are included in the OIDC token for repository actions in an organization.
OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.
Jetons d’accès affinés pour « List OIDC custom property inclusions for an organization »
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
- Jetons d’accès utilisateur d’application GitHub
- Jetons d’accès d’installation d’application GitHub
- Tokens d’accès personnel à granularité fine
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Administration" organization permissions (read)
Paramètres pour « List OIDC custom property inclusions for an organization »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
org string RequisThe organization name. The name is not case sensitive. |
Codes d’état de la réponse HTTP pour « List OIDC custom property inclusions for an organization »
| Code de statut | Description |
|---|---|
200 | A JSON array of OIDC custom property inclusions |
403 | Forbidden |
404 | Resource not found |
Exemples de code pour « List OIDC custom property inclusions for an organization »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/orgs/ORG/actions/oidc/customization/properties/repoA JSON array of OIDC custom property inclusions
Status: 200[
{
"property_name": "environment"
},
{
"property_name": "team"
}
]Create an OIDC custom property inclusion for an organization
Adds a repository custom property to be included in the OIDC token for repository actions in an organization.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
Jetons d’accès affinés pour « Create an OIDC custom property inclusion for an organization »
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
- Jetons d’accès utilisateur d’application GitHub
- Jetons d’accès d’installation d’application GitHub
- Tokens d’accès personnel à granularité fine
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Administration" organization permissions (write)
Paramètres pour « Create an OIDC custom property inclusion for an organization »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
org string RequisThe organization name. The name is not case sensitive. |
| Nom, Type, Description |
|---|
custom_property_name string RequisThe name of the custom property to include in the OIDC token |
Codes d’état de la réponse HTTP pour « Create an OIDC custom property inclusion for an organization »
| Code de statut | Description |
|---|---|
201 | OIDC custom property inclusion created |
400 | Invalid input |
403 | Forbidden |
422 | Property inclusion already exists |
Exemples de code pour « Create an OIDC custom property inclusion for an organization »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/orgs/ORG/actions/oidc/customization/properties/repo \
-d '{"custom_property_name":"environment"}'OIDC custom property inclusion created
Status: 201{
"custom_property_name": "environment"
}Delete an OIDC custom property inclusion for an organization
Removes a repository custom property from being included in the OIDC token for repository actions in an organization.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
Jetons d’accès affinés pour « Delete an OIDC custom property inclusion for an organization »
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
- Jetons d’accès utilisateur d’application GitHub
- Jetons d’accès d’installation d’application GitHub
- Tokens d’accès personnel à granularité fine
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Administration" organization permissions (write)
Paramètres pour « Delete an OIDC custom property inclusion for an organization »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
org string RequisThe organization name. The name is not case sensitive. |
custom_property_name string RequisThe name of the custom property to remove from OIDC token inclusion |
Codes d’état de la réponse HTTP pour « Delete an OIDC custom property inclusion for an organization »
| Code de statut | Description |
|---|---|
204 | OIDC custom property inclusion deleted |
400 | Invalid input |
403 | Forbidden |
404 | Property inclusion not found |
Exemples de code pour « Delete an OIDC custom property inclusion for an organization »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/orgs/ORG/actions/oidc/customization/properties/repo/CUSTOM_PROPERTY_NAMEOIDC custom property inclusion deleted
Status: 204Get the customization template for an OIDC subject claim for an organization
Gets the customization template for an OpenID Connect (OIDC) subject claim.
OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.
Jetons d’accès affinés pour « Get the customization template for an OIDC subject claim for an organization »
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
- Jetons d’accès utilisateur d’application GitHub
- Jetons d’accès d’installation d’application GitHub
- Tokens d’accès personnel à granularité fine
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Administration" organization permissions (read)
Paramètres pour « Get the customization template for an OIDC subject claim for an organization »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
org string RequisThe organization name. The name is not case sensitive. |
Codes d’état de la réponse HTTP pour « Get the customization template for an OIDC subject claim for an organization »
| Code de statut | Description |
|---|---|
200 | A JSON serialized template for OIDC subject claim customization |
Exemples de code pour « Get the customization template for an OIDC subject claim for an organization »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/orgs/ORG/actions/oidc/customization/subA JSON serialized template for OIDC subject claim customization
Status: 200{
"include_claim_keys": [
"repo",
"context"
]
}Set the customization template for an OIDC subject claim for an organization
Creates or updates the customization template for an OpenID Connect (OIDC) subject claim.
OAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Jetons d’accès affinés pour « Set the customization template for an OIDC subject claim for an organization »
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
- Jetons d’accès utilisateur d’application GitHub
- Jetons d’accès d’installation d’application GitHub
- Tokens d’accès personnel à granularité fine
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Administration" organization permissions (write)
Paramètres pour « Set the customization template for an OIDC subject claim for an organization »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
org string RequisThe organization name. The name is not case sensitive. |
| Nom, Type, Description |
|---|
include_claim_keys array of strings RequisArray of unique strings. Each claim key can only contain alphanumeric characters and underscores. |
Codes d’état de la réponse HTTP pour « Set the customization template for an OIDC subject claim for an organization »
| Code de statut | Description |
|---|---|
201 | Empty response |
403 | Forbidden |
404 | Resource not found |
Exemples de code pour « Set the customization template for an OIDC subject claim for an organization »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/orgs/ORG/actions/oidc/customization/sub \
-d '{"include_claim_keys":["repo","context"]}'Empty response
Status: 201Get the customization template for an OIDC subject claim for a repository
Gets the customization template for an OpenID Connect (OIDC) subject claim.
OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.
Jetons d’accès affinés pour « Get the customization template for an OIDC subject claim for a repository »
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
- Jetons d’accès utilisateur d’application GitHub
- Jetons d’accès d’installation d’application GitHub
- Tokens d’accès personnel à granularité fine
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Actions" repository permissions (read)
Ce point de terminaison peut être utilisé sans authentification ou sans les autorisations mentionnées ci-dessus si seules les ressources publiques sont demandées.
Paramètres pour « Get the customization template for an OIDC subject claim for a repository »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
owner string RequisThe account owner of the repository. The name is not case sensitive. |
repo string RequisThe name of the repository without the |
Codes d’état de la réponse HTTP pour « Get the customization template for an OIDC subject claim for a repository »
| Code de statut | Description |
|---|---|
200 | Status response |
400 | Bad Request |
404 | Resource not found |
Exemples de code pour « Get the customization template for an OIDC subject claim for a repository »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/repos/OWNER/REPO/actions/oidc/customization/subStatus response
Status: 200{
"use_default": false,
"include_claim_keys": [
"repo",
"context"
]
}Set the customization template for an OIDC subject claim for a repository
Sets the customization template and opt-in or opt-out flag for an OpenID Connect (OIDC) subject claim for a repository.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
Jetons d’accès affinés pour « Set the customization template for an OIDC subject claim for a repository »
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
- Jetons d’accès utilisateur d’application GitHub
- Jetons d’accès d’installation d’application GitHub
- Tokens d’accès personnel à granularité fine
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Actions" repository permissions (write)
Paramètres pour « Set the customization template for an OIDC subject claim for a repository »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
owner string RequisThe account owner of the repository. The name is not case sensitive. |
repo string RequisThe name of the repository without the |
| Nom, Type, Description |
|---|
use_default boolean RequisWhether to use the default template or not. If |
include_claim_keys array of strings Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. |
Codes d’état de la réponse HTTP pour « Set the customization template for an OIDC subject claim for a repository »
| Code de statut | Description |
|---|---|
201 | Empty response |
400 | Bad Request |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Exemples de code pour « Set the customization template for an OIDC subject claim for a repository »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/repos/OWNER/REPO/actions/oidc/customization/sub \
-d '{"use_default":false,"include_claim_keys":["repo","context"]}'Empty response
Status: 201