Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Revoke All Tokens User

POST/api/v2/admin/users/{userId}/revokeAllTokens

Invalidate all previously issued authentication tokens for the user including active browser sessions and long-lived development tokens. If the user has active sessions in a browser, this will force re-authentication.

Previously issued authentication tokens may not appear as explicitly revoked but they will not be considered valid when used to authenticate requests. The invalidation may not take effect immediately, but will take effect within a couple of minutes.

The caller must have permission to manage users for the target user's organization.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:admin-write.

Path parameters

userId
string

A Foundry User ID.

Examples

Request

Copied!
1 2 3 curl -X POST \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/admin/users/dd05feb8-662a-445d-8f4c-ce92d46bedeb/revokeAllTokens"

Error responses

Error Name
UserDeletedError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe user is deleted.
ParametersprincipalId
RevokeAllTokensUserPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not revokeAllTokens the User.
ParametersuserId
UserNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given User could not be found.
ParametersuserId