> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contextual.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Role-Based Access Control (RBAC)

> Define custom roles and permission bundles across agents, datastores, and more.

*********Contextual AI is excited to introduce Role-Based Access Control (RBAC). RBAC is exclusive to customers on our Provisioned Throughput plan. Please contact your account team for more information.*********

Admins can now define custom roles with tailored permission bundles across key objects — including Agents, Datastores, Billing, and other administrative features. Permissions can be scoped to specific Agents or Datastores, enabling finer-grained governance so every team member has the right level of access for their role.

**Groups** make access management even simpler: add multiple users to a Group, then assign that Group to a Role.

## Roles

### Navigating to the Roles Page

First, click `Settings` under `Admin` in the side-panel.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at2.23.28PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=94005af7042b06101d018ddab55e4daf" alt="Screenshot 2025-11-12 at 2.23.28 PM.png" title="Screenshot 2025-11-12 at 2.23.28 PM.png" style={{ width:"26%" }} width="594" height="1352" data-path="images/Screenshot2025-11-12at2.23.28PM.png" />

Next, click `Roles` under `Access Control`.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Untitled2.001.jpeg?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=cbd719cc1744ce0b0935a34a03cec01a" alt="Untitled 2.001.jpeg" width="1920" height="1080" data-path="images/Untitled2.001.jpeg" />

### Default Roles

Your tenant comes with three default roles:

* `Admin`: Default role with full access to agents, datastores, and workspace settings.
* `User`: Default role that every new user is automatically assigned to. This role **does not** come with any access to agents or datastores.
* `Power User`: Default role that grants read access to all agents and datastores.

By default, all new users are given the `User` role. They won't be able to access agents or datastores until they’re assigned a Role with higher-level permissions.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at4.00.25PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=483e3946798b68c6df71cddcea729164" alt="Screenshot 2025-11-12 at 4.00.25 PM.png" width="2194" height="942" data-path="images/Screenshot2025-11-12at4.00.25PM.png" />

### Creating a Custom Role

You can create custom roles to meet your governance needs. Here are examples of custom roles you can create:

* **Billing Admin** – Access to billing and usage features
* **Data Ingestor** – Manage and ingest documents within specific Datastores
* **Agent User** – Query and interact with designated Agents
* **Agent Admin** – Maintain and optimize designated Agents

First, click "New Role" in the **Roles** page.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at2.36.20PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=3c95dc4a1815aaf1b9512f09b69bd7f2" alt="Screenshot 2025-11-12 at 2.36.20 PM.png" width="2044" height="522" data-path="images/Screenshot2025-11-12at2.36.20PM.png" />

Second, input a Role Name and Description. Click "Create role".

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at2.48.07PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=a181b09d87e340661e0854867fcbd8b5" alt="Screenshot 2025-11-12 at 2.48.07 PM.png" width="1810" height="1212" data-path="images/Screenshot2025-11-12at2.48.07PM.png" />

### Configuring Role Permissions

After creating a Role, you will be automatically directed to the Role page. The first tab is for you to configure permissions. Click “Add Permission” to associate a permission with the Role.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at2.49.20PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=c0e0202ccfbe775ae57c840e24e550ff" alt="Screenshot 2025-11-12 at 2.49.20 PM.png" width="2934" height="1698" data-path="images/Screenshot2025-11-12at2.49.20PM.png" />

You will need to select what type of object you want to grant access to. You have three options:

* `Agents`: Select this to give permissions on an agent
* `Datastores`: Select this to give permissions on a Datastore
* `Admin Tools`: Select this to give access to admin functions like billing and [annotating feedback](/how-to-guides/feedback).

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at2.54.03PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=b87b682ad4ba03bc0e439a8a57235dc1" alt="Screenshot 2025-11-12 at 2.54.03 PM.png" width="1924" height="1220" data-path="images/Screenshot2025-11-12at2.54.03PM.png" />

You can then configure permissions relevant to the object type you selected.

#### Configuring Agent Permissions

On the left, you’ll see a **list of available permissions**. Each defines what actions the Role can take.

* `Query Agents`: This permission will let assigned users query the agent.
* `Manage Agents`: This permission will let assigned users query the agent and edit its configs. It is a superset of `Query Agents`.
* `Create Agents`: This permission will let assigned users create an agent.

On the **right**, you’ll see the **objects** these permissions apply to.

* For `Query Agents` and `Manage Agents`, you can select specific agents or select `All Agents`.
* The`Create Agents` permission will apply globally.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.00.35PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=6ffa48978c80e787447acac19c5c874f" alt="Screenshot 2025-11-12 at 3.00.35 PM.png" width="2744" height="1680" data-path="images/Screenshot2025-11-12at3.00.35PM.png" />

<Note>
  **Important:** To query data from an agent’s linked datastores, a user must have both (i) `Query Agents` or `Manage Agents` and (ii) `Read Documents` (or higher) on the specific datastores. This ensures that when an agent is linked to multiple datastores, users can only query the ones they are permitted to access.

  Example:

  * `Agent_1` is linked to `Datastore_1` and `Datastore_2`.
  * The user has `Query Agents` on `Agent_1` and `Read Documents` on `Datastore_1` only.
  * As a result, only documents from `Datastore_1` will be retrieved.
</Note>

#### Configuring Datastore Permissions

On the left, you’ll see a **list of available permissions**. Each defines what actions the Role can take.

* `Read Documents`: This permission will let assigned users see the datastore and read documents inside.
* `Manage Documents`: This permission will let assigned users read documents, as well as upload/delete them. It is a superset of `Read Documents`.
* `Manage Datastores`: This permission will let assigned users manage documents, as well as edit the datastore configs. It is a superset of `Manage Documents`.
* `Create Datastores`: This permission will let assigned users create a datastore.

On the **right**, you’ll see the **objects** these permissions apply to.

* For `Read Documents` , `Manage Documents` and `Manage Datastores`, you can select specific datastores or select `All Datastores`.
* The`Create Datastores` permission will apply globally.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.04.27PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=42210719c5aec448c5d2a1dba1ceb7e4" alt="Screenshot 2025-11-12 at 3.04.27 PM.png" width="2724" height="1668" data-path="images/Screenshot2025-11-12at3.04.27PM.png" />

<Note>
  **Important:** To query data from an agent’s linked datastores, a user must have both (i) `Query Agents` or `Manage Agents` and (ii) `Read Documents` (or higher) on the specific datastores. This ensures that when an agent is linked to multiple datastores, users can only query the ones they are permitted to access.
</Note>

#### Configuring Admin Permissions

On the left, you’ll see a **list of available permissions**. Each defines what actions the Role can take.

* `Create Agents`: This permission will let assigned users create an agent.
* `Create Datastores`: This permission will let assigned users create a datastore.
* `Manage Billing & Usage`: This permission will let assigned users view and configure the `Billing` page.
* `Manage Feedback Annotation`: This permission will let assigned users [view and annotate agent-level feedback](/how-to-guides/feedback).

All these permissions apply globally.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.11.26PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=536c44f39ff792fceae5732115e1e55c" alt="Screenshot 2025-11-12 at 3.11.26 PM.png" width="2710" height="1676" data-path="images/Screenshot2025-11-12at3.11.26PM.png" />

### Review your Permissions

Review all the permissions that you have provisioned for the Role. You can add more permissions or remove existing ones by clicking on the three dots beside each permission and clicking "Remove".

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.13.23PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=9fc2b98f64b56844d631db19bbf7f2d8" alt="Screenshot 2025-11-12 at 3.13.23 PM.png" width="2248" height="976" data-path="images/Screenshot2025-11-12at3.13.23PM.png" />

### Assigning a User to a Role

To assign a user to the Role, click the `Assigned Users` tab in the Roles Page.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.14.24PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=ab69b365a9dcbb668d8f154ab6e46139" alt="Screenshot 2025-11-12 at 3.14.24 PM.png" width="2248" height="1312" data-path="images/Screenshot2025-11-12at3.14.24PM.png" />

Next, click "Assign Users". You'll be able to select multiple users to add to the role. Click "Confirm".

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.15.16PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=6259bf1834b884fb6880ad0c77f8b419" alt="Screenshot 2025-11-12 at 3.15.16 PM.png" title="Screenshot 2025-11-12 at 3.15.16 PM.png" style={{ width:"83%" }} width="1828" height="1696" data-path="images/Screenshot2025-11-12at3.15.16PM.png" />

Third, review the users you've added. You can add more users or remove existing ones by clicking on the three dots beside a user and clicking "Remove".

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.16.16PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=dd437b68bfc2588b58d96cee04b9bbcc" alt="Screenshot 2025-11-12 at 3.16.16 PM.png" width="2258" height="978" data-path="images/Screenshot2025-11-12at3.16.16PM.png" />

**You’re all set!** The assigned users now have the access defined in this Role.

### Dealing with Role Conflicts

If a user is assigned to two roles with different permissions on the same object, we will take the **union of permissions**. Example:

* User is assigned to `Role A` which is given `Query Agents` on `All Agents`
* User is also assigned to `Role B` which is given the higher-level `Manage Agents` on `Agent A`.
* Outcome:
  * User will have `Manage Agents` on `Agent A`
  * User will have `Query Agents` on every other agent.

### Managing Roles

After creating a Role, you can return to its configuration page at any time. To do so, navigate to the **Roles** page and click on the Role you want to edit.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.30.02PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=2bcb8e3cd1c41933bc4fba27379caa9d" alt="Screenshot 2025-11-12 at 3.30.02 PM.png" width="2198" height="1188" data-path="images/Screenshot2025-11-12at3.30.02PM.png" />

You can also delete a Role by clicking on the three dots beside it and clicking "Delete".

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.26.12PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=0a17794e3b9b0559478c888ba6af78c9" alt="Screenshot 2025-11-12 at 3.26.12 PM.png" width="2214" height="238" data-path="images/Screenshot2025-11-12at3.26.12PM.png" />

### Creating Agents and Datastores

If a user has created an Agent or Datastore, an owner Role will automatically be created with `Manage Agent` or `Manage Datastore` permissions. The user will automatically be assigned to that Role.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.45.49PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=1610ef7a3899274cde016d31ae253916" alt="Screenshot 2025-11-12 at 3.45.49 PM.png" width="2058" height="1446" data-path="images/Screenshot2025-11-12at3.45.49PM.png" />

## Groups

### Navigating to the Groups page

Groups can help simplify access management. You can add multiple users to a Group and assign the Group to a Role.

First, click `Settings` under `Admin` in the side-panel.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at2.23.28PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=94005af7042b06101d018ddab55e4daf" alt="Screenshot 2025-11-12 at 2.23.28 PM.png" title="Screenshot 2025-11-12 at 2.23.28 PM.png" style={{ width:"25%" }} width="594" height="1352" data-path="images/Screenshot2025-11-12at2.23.28PM.png" />

Next, click "Groups" under "Access Control".

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Untitled4.001.jpeg?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=0ba13eb3529a36e2e687b9fadc73a9bd" alt="Untitled 4.001.jpeg" width="1920" height="1080" data-path="images/Untitled4.001.jpeg" />

### Creating a Group

Click "New Group".

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.36.38PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=d0d4be09e1ee12c56912f3b01f50a809" alt="Screenshot 2025-11-12 at 3.36.38 PM.png" width="2738" height="960" data-path="images/Screenshot2025-11-12at3.36.38PM.png" />

Fill in Group Name and Description

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.37.52PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=002994e9b2feeacf2705377db9b868d5" alt="Screenshot 2025-11-12 at 3.37.52 PM.png" width="1798" height="1228" data-path="images/Screenshot2025-11-12at3.37.52PM.png" />

Click "Create group". You'll be automatically redirected to the Group page.

### Assigning Users to the Group

Click the tab "Assigned Users".

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.40.01PM.jpg?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=6d42c4244d77571cd36b979dd96d92d3" alt="Screenshot 2025-11-12 at 3.40.01 PM.jpg" width="2726" height="1546" data-path="images/Screenshot2025-11-12at3.40.01PM.jpg" />

Click "Assign Users" and select the users you want to include in the Group. Click "Confirm".

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.39.02PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=096e23e05d44ac96c455dcfeedb9dd2f" alt="Screenshot 2025-11-12 at 3.39.02 PM.png" title="Screenshot 2025-11-12 at 3.39.02 PM.png" style={{ width:"86%" }} width="1786" height="1702" data-path="images/Screenshot2025-11-12at3.39.02PM.png" />

Review the users you have added. You can add more users to the Group or remove existing users by clicking the three dots and clicking "Remove".

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.39.32PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=248b545bf61738014d25ec695f0da489" alt="Screenshot 2025-11-12 at 3.39.32 PM.png" width="2064" height="950" data-path="images/Screenshot2025-11-12at3.39.32PM.png" />

### Associating a Group with a Role

Navigate to the first tab: "Roles".

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.43.47PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=ee6cd1bb49b158b31e49ff6a1d8d185d" alt="Screenshot 2025-11-12 at 3.43.47 PM.png" width="2738" height="948" data-path="images/Screenshot2025-11-12at3.43.47PM.png" />

Click "Add Roles".

You can select roles to associate with your Group.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.41.42PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=dc4820900d92a6ae01f5b503b244c56a" alt="Screenshot 2025-11-12 at 3.41.42 PM.png" title="Screenshot 2025-11-12 at 3.41.42 PM.png" style={{ width:"77%" }} width="1820" height="1526" data-path="images/Screenshot2025-11-12at3.41.42PM.png" />

Click "Add Roles". You can add more roles or remove existing ones by clicking on the three dots and clicking "Remove".

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.46.40PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=a95bcb3e358932151a188a8fbff74486" alt="Screenshot 2025-11-12 at 3.46.40 PM.png" width="2734" height="1028" data-path="images/Screenshot2025-11-12at3.46.40PM.png" />

**You're set!** Members of the Group now have have the access defined in the attached Roles.

### Managing a Group

After creating a Group, you can return to its configuration page at any time. To do so, navigate to the **Groups** page and click on the Group you want to edit.

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.48.21PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=331ad09998caf6779ae7663b1e4d6379" alt="Screenshot 2025-11-12 at 3.48.21 PM.png" width="2758" height="952" data-path="images/Screenshot2025-11-12at3.48.21PM.png" />

You can also delete a Group by clicking on the three dots beside it and clicking "Delete".

<img src="https://mintcdn.com/contextualai/NbmrjtDuaYK5vh9E/images/Screenshot2025-11-12at3.48.37PM.png?fit=max&auto=format&n=NbmrjtDuaYK5vh9E&q=85&s=7a144ef07dae99dbc544660c6fd64409" alt="Screenshot 2025-11-12 at 3.48.37 PM.png" width="2114" height="576" data-path="images/Screenshot2025-11-12at3.48.37PM.png" />

## User Management

You can view the roles and groups associated with each user.

First, navigate to `Members` in the `Access Control` tab. You will see the list of members in your workspace.

<img src="https://mintcdn.com/contextualai/g63USwYg-G47lQRM/images/Screenshot2025-11-24at11.53.27AM.png?fit=max&auto=format&n=g63USwYg-G47lQRM&q=85&s=50c854d905f168821cded61e84da6224" alt="Screenshot 2025-11-24 at 11.53.27 AM.png" width="3084" height="1460" data-path="images/Screenshot2025-11-24at11.53.27AM.png" />

To see the **roles** assigned to the user, click the `Expand` button in the `Roles` column. You will see (i) the assigned roles, (ii) the permissions included in each role, and (iii) whether it was assigned directly to the user or inherited via group membership. You can also open up the Role Page with the top-left button.

<img src="https://mintcdn.com/contextualai/g63USwYg-G47lQRM/images/Screenshot2025-11-24at11.57.04AM.png?fit=max&auto=format&n=g63USwYg-G47lQRM&q=85&s=c818aa810ef424638284b9dc26c39385" alt="Screenshot 2025-11-24 at 11.57.04 AM.png" width="2998" height="1830" data-path="images/Screenshot2025-11-24at11.57.04AM.png" />

To see the **groups** that the user belongs to, click the `Expand` button in the `Groups` column.  You will see (i) the user's groups and (ii) the roles associated with each group. You can also open up the Group Page with the top-left button.

<img src="https://mintcdn.com/contextualai/g63USwYg-G47lQRM/images/Screenshot2025-11-24at12.03.25PM.png?fit=max&auto=format&n=g63USwYg-G47lQRM&q=85&s=c35d0615bb07de25effe226bb23c8ec7" alt="Screenshot 2025-11-24 at 12.03.25 PM.png" width="2972" height="1764" data-path="images/Screenshot2025-11-24at12.03.25PM.png" />
