user_grants
Description
Exposes the mapping of users to roles within the organization. Each row represents a single user-to-role grant. Requires USAGE privilege on the organization.
Syntax
SELECT * FROM deltastream.sys."user_grants";Columns
Column
Type
Nullable
Description
org_member_id
VARCHAR
No
Unique identifier of the organization membership record.
user_name
VARCHAR
No
Display name of the user.
user_email
VARCHAR
No
Email address of the user.
role_name
VARCHAR
No
Name of the role granted to the user.
granted_at
TIMESTAMP_LTZ
No
Timestamp when the role was granted to the user.
organization_id
VARCHAR
No
The unique identifier of the organization this resource belongs to.
Examples
$ dsql -e 'SELECT * FROM deltastream.sys."user_grants";'
[{"org_member_id":"00000000-0000-0000-0000-000000000002","user_name":"User Name","user_email":"user@example.com","role_name":"orgadmin","granted_at":"2025-05-22T23:21:22.962Z","organization_id":"00000000-0000-0000-0000-000000000001"},{"org_member_id":"00000000-0000-0000-0000-000000000003","user_name":"User2 Name","user_email":"user2@example.com","role_name":"sysadmin","granted_at":"2025-05-23T21:03:05.239Z","organization_id":"00000000-0000-0000-0000-000000000001"}]Find all roles granted to a specific user by email:
See Also
Last updated

