capabilities.work

Create Role and Grant Privileges

A 3-step recipe with Snowflake. We can help you get access.

Recipe · 3 steps

Create Role and Grant Privileges

with Snowflake · Identity & Access Management

Create a role, grant privileges to it, then list its grants to verify.

  1. Create the role using errorIfExists create mode.
  2. Grant the requested privileges on the securable to the role.
  3. List all grants to the role to confirm the privileges were granted.
What you'll need to have ready
  • authToken: Bearer token (KEYPAIR_JWT, OAUTH, or programmatic access token).
  • tokenType: Value for the X-Snowflake-Authorization-Token-Type header.
  • roleName: Name of the role to create.
  • securable: The securable object the privileges apply to (e.g. database, schema, name).
  • securableType: The type of the securable (e.g. DATABASE, SCHEMA, TABLE).
  • privileges: The list of privileges to grant.
  • comment: Optional comment applied to the role.
For your developer

Arazzo workflow snowflake:create-role-and-grant-privileges, 3 operations: createRole → grantPrivileges → listGrants. Specs on APIs.io.