> For the complete documentation index, see [llms.txt](https://docs.trusst.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trusst.ai/product-guides/user-roles-and-permissions.md).

# User Roles & Permissions

### Access Roles Overview

After completing your IDP setup described in [Integrating Your Identity Provider](https://docs.trusst.ai/product-guides/integrating-your-identity-provider),\
this page explains how Trusst AI roles and permissions are structured and how they’re applied once users successfully authenticate.

Trusst AI uses a role-based access control system managed through your organisation’s identity provider (IDP), such as Okta or Microsoft Entra ID.

Roles must be passed to Trusst AI in the `roles` claim of the ID token.\
If unavailable, Trusst AI will also accept a `role` (singular) or a `groups` claim.\
Both must be arrays of strings.

The supported role keys are:

* **Viewer** (`trusst_ai_viewer`)
* **Analyst** (`trusst_ai_analyst`)
* **Editor** (`trusst_ai_editor`)
* **Admin** (`trusst_ai_admin`)

Ensure that users are assigned to one or more of these roles in your IDP, and that either the `roles` or `groups` claim includes them in the authentication payload.

### Example Authentication Payload

```json
{
  "sub": "idp|ml-ops-9087",
  "name": "Al Gorithm",
  "email": "zero.shot@example.com",
  "roles": [
    "trusst_ai_admin"
  ]
}
```

### Role-Based Permissions Table

<table><thead><tr><th width="213.91015625">Feature</th><th width="200.65234375">Permission</th><th width="93.5078125" align="center">Viewer</th><th width="94.2265625" align="center">Analyst</th><th width="89.171875" align="center">Editor</th><th width="99.66796875" align="center">Admin</th></tr></thead><tbody><tr><td><strong>Contacts</strong></td><td><code>contacts:view</code></td><td align="center">✅</td><td align="center">✅</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td><strong>Chat</strong></td><td><code>chat:edit</code></td><td align="center">🚫</td><td align="center">✅</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td><strong>Criteria (view)</strong></td><td><code>criteria:view</code></td><td align="center">🚫</td><td align="center">✅</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td><strong>Criteria (edit)</strong></td><td><code>criteria:edit</code></td><td align="center">🚫</td><td align="center">🚫</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td><strong>General Settings (view)</strong></td><td><code>settings_general:view</code></td><td align="center">🚫</td><td align="center">✅</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td><strong>General Settings (edit)</strong></td><td><code>settings_general:edit</code></td><td align="center">🚫</td><td align="center">🚫</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td><strong>System Status</strong></td><td><code>system_status:view</code></td><td align="center">🚫</td><td align="center">✅</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td><strong>Streams</strong></td><td><code>streams:edit</code></td><td align="center">🚫</td><td align="center">🚫</td><td align="center">🚫</td><td align="center">✅</td></tr><tr><td><strong>AI Agents (view)</strong></td><td><code>agents:view</code></td><td align="center">🚫</td><td align="center">✅</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td><strong>AI Agents (edit)</strong></td><td><code>agents:edit</code></td><td align="center">🚫</td><td align="center">🚫</td><td align="center">🚫</td><td align="center">✅</td></tr><tr><td><strong>AI Agent Numbers (view)</strong></td><td><code>agent_numbers:view</code></td><td align="center">🚫</td><td align="center">🚫</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td><strong>AI Agent Numbers (edit)</strong></td><td><code>agent_numbers:edit</code></td><td align="center">🚫</td><td align="center">🚫</td><td align="center">🚫</td><td align="center">✅</td></tr><tr><td><strong>AI Agent Abilities</strong></td><td><code>agent_abilities:edit</code></td><td align="center">🚫</td><td align="center">🚫</td><td align="center">🚫</td><td align="center">✅</td></tr><tr><td><strong>AI Agent Keys (Secrets)</strong></td><td><code>agent_keys:edit</code></td><td align="center">🚫</td><td align="center">🚫</td><td align="center">🚫</td><td align="center">✅</td></tr></tbody></table>
