grantRole

Last updated: January 27, 2026

Grants a role to a user or to another role in Snowflake. Used to assign roles to users for access control or to create role hierarchies.

Note: Automatic rollback revokes the granted role.

Known limitation: This change type does not support database inspection features (snapshot, diff, diff-changelog, and generate-changelog commands).

Available attributes

Attribute

Type

Description

Required

roleName

String

Name of the role to grant

Yes

toUser

String

Name of the user to grant the role to*

No

toRole

String

Name of the role to grant the role to*

No

* Exactly one of toUser or toRole must be specified

loading

loading

loading

loading