Create a custom role

Define an account role from built-in roles and permissions, with denies that remove permissions wherever a condition holds.

Create a custom role

A custom role bundles permissions for one account. Use one when no built-in role fits, or to give many people the same narrowed access: a deny in the role applies to every grant of it.

Creating and editing roles needs account.manage_roles (Role administrator). An account holds at most 200 custom roles.

Steps

  1. Open Settings → Account → Roles and select New role.
  2. Fill in Name and Description.
  3. Under Can be granted on, tick the resource types the role may be granted on, such as Account or Table.
  4. Under Can be granted to, tick User, Agent and/or Service account. Groups can hold the role when their members' types are allowed.
  5. Under Includes built-in roles, tick roles to start from, and add single permissions under Grants. Ticking a whole type also covers permissions added to it later.
  6. Under Denies, select Add deny for each exception:
    • Denied permissions: permissions of one resource type that the role grants.
    • Condition: when the deny holds, read against the resource (conditions). Use true to deny always.
  7. Check Effective permissions, then select Create role.

A role holds at most 16 denies. A deny whose condition cannot be evaluated holds, so the permission is denied.

Editing a role changes every grant of it; the editor shows how many grants it has. Widening a role that is granted needs the permissions it adds, as granting them would (who may grant what).

Example: support reader without the audit tables

  1. Name: Support reader. Can be granted on: Account. Can be granted to: User.
  2. Includes built-in roles: Data reader and Dashboard viewer.
  3. Add deny: Denied permissions table.read, Condition resource.Name.startsWith("audit.").
  4. Create role, then grant it to the support group on the account (grant access).

Support staff read every table and dashboard of the account except tables whose names start with audit., including ones created later.