엔터프라이즈 자격 증명 권한 부여를 위한 REST API 엔드포인트
REST API를 사용하여 엔터프라이즈 자격 증명 권한 부여를 관리합니다.
Revoke enterprise-delegated credential authorizations
Queues revocation of every active organization credential authorization created through enterprise delegation for the enterprise. Credential authorizations created through SAML or other flows are not affected.
The authenticated GitHub App must be owned by the enterprise or one of its organizations,
installed on the enterprise, and have the enterprise_credentials:write permission.
"Revoke enterprise-delegated credential authorizations"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:
- "Enterprise credentials" enterprise permissions (write)
"Revoke enterprise-delegated credential authorizations"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
enterprise string 필수The slug version of the enterprise name. |
| 이름, 유형, 설명 |
|---|
integration_id integer The database ID of a GitHub App currently owned by the enterprise or one of its organizations, or a formerly owned GitHub App with delegation history for the enterprise. When provided, only credential authorizations delegated by that App are revoked. When omitted, all enterprise-delegated credential authorizations for the enterprise are revoked. |
"Revoke enterprise-delegated credential authorizations"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
202 | Delegated credential authorization revocation was queued. |
403 | Forbidden |
404 | Resource not found |
"Revoke enterprise-delegated credential authorizations"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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/credential-authorizationsDelegated credential authorization revocation was queued.
Status: 202{
"message": "Enterprise-delegated credential authorization revocation has been queued"
}Revoke all credential authorizations for an enterprise
Revokes all credential authorizations for all organizations within the enterprise. This includes any guest, outside, or repository collaborators.
For Enterprise Managed User (EMU) enterprises, you can optionally also destroy all
credentials (PATs v1, PATs v2, and SSH keys) owned by enterprise members by setting
the revoke_credentials parameter to true.
This operation is performed asynchronously. A background job will be queued to process the revocations.
Warning
If you use a personal access token to call this endpoint, that token may also be revoked or destroyed as part of this operation.
The authenticated user must be an enterprise owner or have the write_enterprise_credentials permission to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
"Revoke all credential authorizations for an enterprise"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:
- "Enterprise credentials" enterprise permissions (write)
"Revoke all credential authorizations for an enterprise"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
enterprise string 필수The slug version of the enterprise name. |
| 이름, 유형, 설명 |
|---|
revoke_credentials boolean Whether to also destroy the actual credentials (PATs and SSH keys) owned by
enterprise members. This option is only available for Enterprise Managed User
(EMU) enterprises. When set to 기본값: |
"Revoke all credential authorizations for an enterprise"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
202 | Accepted - The revocation request has been queued |
403 | Forbidden |
404 | Resource not found |
422 | Validation error - The |
"Revoke all credential authorizations for an enterprise"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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/credential-authorizations/revoke-all \
-d '{"revoke_credentials":false}'Accepted - The revocation request has been queued
Status: 202{
"message": "Credential authorization revocation has been queued"
}Revoke a single credential type for an enterprise
Revokes a single credential type (for example, classic personal access tokens) across all organizations within the enterprise. This removes the sign-in authorizations for that credential type for every member of the enterprise.
For Enterprise Managed User (EMU) enterprises, you can optionally also destroy the
actual credentials of that type owned by enterprise members by setting the
revoke_credentials parameter to true.
This operation is performed asynchronously. A background job will be queued to process the revocations.
Warning
If you use a personal access token to call this endpoint, that token may also be revoked or destroyed as part of this operation.
The authenticated user must be an enterprise owner or have the write_enterprise_credentials permission to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
"Revoke a single credential type for an enterprise"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:
- "Enterprise credentials" enterprise permissions (write)
"Revoke a single credential type for an enterprise"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
enterprise string 필수The slug version of the enterprise name. |
| 이름, 유형, 설명 |
|---|
credential_type string 필수The type of credential to revoke across the enterprise. 다음 중 하나일 수 있습니다.: |
revoke_credentials boolean Whether to also destroy the actual credentials of this type owned by
enterprise members. This option is only available for Enterprise Managed
User (EMU) enterprises. When set to 기본값: |
"Revoke a single credential type for an enterprise"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
202 | Accepted - The revocation request has been queued |
403 | Forbidden |
404 | Resource not found |
422 | Validation error - The |
"Revoke a single credential type for an enterprise"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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/credential-authorizations/revoke-credential-type \
-d '{"credential_type":"classic_pat","revoke_credentials":false}'Accepted - The revocation request has been queued
Status: 202{
"message": "Credential type revocation has been queued"
}Revoke credential authorizations for a user in an enterprise
Revokes all credential authorizations for a single user within the enterprise. This includes any credential authorizations the user has across all organizations in the enterprise.
For Enterprise Managed User (EMU) enterprises, you can optionally also destroy all
credentials (PATs v1, PATs v2, and SSH keys) owned by the user by setting
the revoke_credentials parameter to true.
This operation is performed asynchronously. A background job will be queued to process the revocations.
Warning
If you use a personal access token to call this endpoint and target yourself, that token may also be revoked or destroyed as part of this operation.
The authenticated user must be an enterprise owner or have the write_enterprise_credentials permission to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
"Revoke credential authorizations for a user in an enterprise"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:
- "Enterprise credentials" enterprise permissions (write)
"Revoke credential authorizations for a user in an enterprise"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
enterprise string 필수The slug version of the enterprise name. |
username string 필수The handle for the GitHub user account. |
| 이름, 유형, 설명 |
|---|
revoke_credentials boolean Whether to also destroy the actual credentials (PATs and SSH keys) owned by
the user. This option is only available for Enterprise Managed User (EMU)
enterprises. When set to 기본값: |
"Revoke credential authorizations for a user in an enterprise"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
202 | Accepted - The revocation request has been queued |
403 | Forbidden |
404 | Resource not found |
422 | Validation error - The target user cannot be revoked, or |
"Revoke credential authorizations for a user in an enterprise"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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/credential-authorizations/USERNAME/revoke \
-d '{"revoke_credentials":false}'Accepted - The revocation request has been queued
Status: 202{
"message": "Credential authorization revocation for user 'octocat' has been queued"
}Revoke a single credential type for a user in an enterprise
Revokes a single credential type (for example, classic personal access tokens) for a single user within the enterprise. This removes the sign-in authorizations for that credential type across all organizations in the enterprise for the user.
For Enterprise Managed User (EMU) enterprises, you can optionally also destroy the
actual credential of that type owned by the user by setting the revoke_credentials
parameter to true.
This operation is performed asynchronously. A background job will be queued to process the revocations.
Warning
If you use a personal access token to call this endpoint and target yourself, that token may also be revoked or destroyed as part of this operation.
The authenticated user must be an enterprise owner or have the write_enterprise_credentials permission to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
"Revoke a single credential type for a user in an enterprise"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:
- "Enterprise credentials" enterprise permissions (write)
"Revoke a single credential type for a user in an enterprise"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
enterprise string 필수The slug version of the enterprise name. |
username string 필수The handle for the GitHub user account. |
| 이름, 유형, 설명 |
|---|
credential_type string 필수The type of credential to revoke for the user. 다음 중 하나일 수 있습니다.: |
revoke_credentials boolean Whether to also destroy the actual credential of this type owned by the
user. This option is only available for Enterprise Managed User (EMU)
enterprises. When set to 기본값: |
"Revoke a single credential type for a user in an enterprise"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
202 | Accepted - The revocation request has been queued |
403 | Forbidden |
404 | Resource not found |
422 | Validation error - The |
"Revoke a single credential type for a user in an enterprise"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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/credential-authorizations/USERNAME/revoke-credential-type \
-d '{"credential_type":"classic_pat","revoke_credentials":false}'Accepted - The revocation request has been queued
Status: 202{
"message": "Credential type revocation for user 'octocat' has been queued"
}