latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-141,4691,08313.4 MB

daeba3129b5f

orgs

Revoke credential authorizations for a user in an organization

Revokes all SAML SSO credential authorizations for a single user within the organization. This removes the sign-in authorizations for the user's personal access tokens, SSH keys, OAuth app tokens, and user-to-server tokens that they have authorized for the organization. The user will need to authorize their credentials again to access the organization.

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's authorization for the organization may also be revoked as part of this operation.

The authenticated user must be an organization owner to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

post/orgs/{org}/credential-authorizations/{username}/revoke

Path parameters

orgstring required

The organization name. The name is not case sensitive.

usernamestring required

The handle for the GitHub user account.

Response

Accepted - The revocation request has been queued

messagestring

A message indicating the revocation has been queued

warningstring

A warning message if the token used for this request may be revoked