Role Existence
Check whether a role with specific resource permissions already exists.
Last updated
Was this helpful?
Check whether a role with specific resource permissions already exists.
Last updated
Was this helpful?
Early Access: This API is provided in Early Access. Please contact our customer support team for more information and to enable this feature.
The Role Existence API allows users to check whether a role with specific resource permissions already exists in the system. This API is particularly useful for role management and access governance in Snowflake environments.
This API enables efficient role management by identifying existing roles that already have the permissions you're looking for. Key use cases include:
Role Discovery: Find existing roles that match specific permission requirements
Prevent Role Proliferation: Avoid creating duplicate roles with the same permissions
Permission Auditing: Verify which roles have specific permissions to resources
Role Standardization: Identify standard roles that can be reused for similar access requirements
This feature is currently limited to the Snowflake integration.
The API accepts a request object with the following parameters:
grantee_type
string
Yes
The type of grantee for which the role existence is checked (currently supports only SnowflakeRole
)
resource_permissions
ResourcePermissions[]
Yes
A list of resource permissions to match against existing roles
Each ResourcePermissions
object contains:
node_type
string
Yes
The type of resource node (supported types are SnowflakeDatabase
, SnowflakeTable
, SnowflakeView
, and SnowflakeSchema
)
node_id
string
Yes
Veza node ID of the resource (i.e., ID property in graph and query builder)
raw_permissions
string[]
Yes
A list of permissions to check (e.g., USAGE
, SELECT
, etc.)
The API uses the following protocol buffer message definitions:
The API returns a response object with the following field:
grantee_ids
string[]
A list of existing role IDs that match the given permissions
This example checks if there's an existing role with USAGE
permission on a specific Snowflake database:
The response indicates that a matching role exists:
You can check for roles that have permissions across multiple resources:
In this example, the request is checking for roles with specific permissions, but no matching roles are found:
The response indicates that no matching roles with the specified permission combination exist:
When you receive an empty response like this, it suggests that a new role might need to be created to satisfy these specific permission requirements, as no existing role has the exact permission set requested.
/api/private/assessments/role_recommendations_role_exists