Revokes a programmatic access token for a user.
ALTER USER … ADD PROGRAMMATIC ACCESS TOKEN (PAT) , ALTER USER … MODIFY PROGRAMMATIC ACCESS TOKEN (PAT) , ALTER USER … ROTATE PROGRAMMATIC ACCESS TOKEN (PAT) , SHOW USER PROGRAMMATIC ACCESS TOKENS
ALTER USER [ IF EXISTS ] [ <username> ] REMOVE { PROGRAMMATIC ACCESS TOKEN | PAT } <token_name>
Copy
Parameters¶username
The name of the user that the token is associated with.
If you omit this parameter, the command revokes the token for the user who is currently logged in (the active user in the current session).
REMOVE { PROGRAMMATIC ACCESS TOKEN | PAT } token_name
Revokes a programmatic access token with the specified name.
You can use the keyword PAT as a shorter way of specifying the keywords PROGRAMMATIC ACCESS TOKEN.
A role used to execute this operation must have the following privileges at a minimum:
Privilege
Object
Notes
MODIFY PROGRAMMATIC AUTHENTICATION METHODS
User
Required only when revoking a programmatic access token for a human user other than yourself or a service user.
For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.
For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.
Usage notes¶You cannot use revoked programmatic access tokens for authentication.
You cannot recover programmatic access tokens. You must generate a new programmatic access token instead.
You cannot revoke a programmatic access token in a session where you used a programmatic access token for authentication.
Revoke a programmatic access token named example_token
from the user example_user
:
ALTER USER IF EXISTS example_user REMOVE PROGRAMMATIC ACCESS TOKEN example_token;
Copy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4