REVOKE ROLE

statementsupportedAccess control (grants, roles)

docs.snowflake.com ↗

Removes a role from another role or a user.

Syntax

supportedpartialnot supportednot scored

REVOKE [ GRANT OPTION FOR ]
  ROLE <name>
  FROM ROLE <parent_role_name>
  [ RESTRICT | CASCADE ]

REVOKE ROLE <name> FROM USER <user_name>

Parameters

NameRequiredDescription
nameSpecifies the identifier for the role to revoke. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.
ROLE parent_role_nameRevokes the role from the specified role.
USER user_nameRevokes the role from the specified user.
GRANT OPTION FORoptionalIf specified, removes the ability for the recipient role to grant the role to another role. The role grant itself remains, so the recipient role still inherits the granted role’s privileges. Default: No value, which revokes the role grant.
RESTRICT | CASCADEoptionalDetermines whether the revoke operation succeeds when the role has been re-granted to another role. These clauses apply to REVOKE ROLE ... FROM ROLE. RESTRICT: If the role being revoked has been re-granted to another role, the REVOKE command fails. CASCADE: If the role being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. GRANT OPTION FOR ... CASCADE revokes the dependent grants and leaves the role grant in place without the grant option. CASCADE without GRANT OPTION FOR revokes the role grant and the dependent grants. Default: RESTRICT

See also

Referenced by