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

# Roles and permissions

> Decide what each person may do in the Aiveth console and what your own apps receive about them.

Every person in your organization has exactly one role. A role carries two kinds of access:

* **Aiveth powers** decide what the person may do in the Aiveth console, such as managing people or apps.
* **App permissions** are names you define, such as `invoices:create` or `pii:view`. Aiveth never acts on them. They travel to your apps in the sign-in token, and your apps decide what they mean.

You manage roles in the console under **Roles**, and app permissions and groups under **Roles** and **Groups**.

## Built-in roles

Every organization has three built-in roles. Their names and Aiveth powers are fixed, and they cannot be deleted. You can still add your own app permissions to them.

| Role | What it can do |
| - | - |
| **Owner** | Everything in the organization's account. There is always at least one active Owner. |
| **Admin** | People, roles and apps. Not sign-in security, acting as other people, or the plan. |
| **Member** | Signs in and sees the organization's people. |

## Aiveth powers

These are the powers a role can carry in the console.

| Power | Name in the console | What it allows |
| - | - | - |
| `users:read` | See people | See the organization's people and their roles. |
| `users:manage` | Manage people | Invite, suspend and remove people. |
| `users:impersonate` | Act as people | Sign in as a person to see what they see (read-only, logged and time-limited). |
| `roles:manage` | Manage roles | Give and take roles, and edit custom roles. |
| `apps:manage` | Manage apps | Register the apps that sign people in with Aiveth. |
| `security:manage` | Manage sign-in security | Two-step rules, IP allowlist and single sign-on. |
| `audit:read` | See sign-in history | Read the organization's sign-in and change records. |
| `billing:manage` | Manage the plan | Change the organization's plan. |

The console menu shows only the pages a person's powers allow.

## Your own roles

> [!NOTE]
>
> Your own roles, app permissions and groups are available on the Pro plan and above.

Make a role when the built-in ones don't fit, for example a branch manager who approves payouts but cannot manage apps.

**1. Open Roles**

In the console, go to **Roles** and choose **New role**.

**2. Start from a template (optional)**

Pick a template to fill in a starting set of powers. You can change everything afterwards.

**3. Set the key, name and description**

The **Key** is what your apps see in the token. It is 2 to 40 lower-case letters, digits or `_`, like `branch_manager`, and it can't be changed later. The **Name** is up to 100 characters.

**4. Choose powers and app permissions**

Tick the **Aiveth powers** and **Your app permissions** the role should carry, then save.

### Templates

Templates are starting points. Nothing holds a template: Aiveth copies it into a new role that is yours to edit.

| Template | Powers |
| - | - |
| Manager / Approver | See people, Manage people |
| Developer | See people, Manage apps |
| Viewer / Auditor | See people, See sign-in history |

## The default role

The default role is the one new people get when nothing else is said, for example in an invitation. It starts as **Member**. To change it, open **Roles** and choose **Make default** on another role. **Owner** can never be the default.

## App permissions

App permissions are the names your own apps check. Add them under **Your app permissions** on the **Roles** page. A name uses lower-case words joined by a colon, like `payout:approve`. Then add the permission to the roles that should carry it.

Removing an app permission removes it from every role.

## Groups

Groups are branches, departments or projects. A person can belong to several groups. Your apps can use a group's name to show each person their group's data.

Make groups under **Groups** with **New group**. A group's name is what apps match on, so it can't be changed later. A group managed by your directory (see [SCIM](https://docs.aiveth.com/access/scim.md)) is marked **From your directory** and is read-only in Aiveth.

## What your apps receive

When your app asks for the `roles` or `groups` scope at sign-in (see [Login with Aiveth](https://docs.aiveth.com/apps/login-with-aiveth.md)), the ID token and userinfo include:

```json theme={null}
{
  "role": "branch_manager",
  "permissions": ["claim:view", "payout:approve"],
  "groups": ["Mumbai Branch"]
}
```

* `role` is the person's role key.
* `permissions` lists that role's app permissions only. Aiveth powers are never included.
* `groups` lists the names of the groups the person belongs to.

For access that depends on a specific branch or project, see [Fine-grained authorization](https://docs.aiveth.com/access/fine-grained-authorization.md).

## Who may change what

Aiveth never lets a person reach above their own access:

* Reading roles, app permissions and groups needs **See people**. Changing roles and naming app permissions needs **Manage roles**. Making groups and changing their members needs **Manage people**.
* You can give, take or edit a role only if all of its Aiveth powers are your own.
* You can only put powers you hold yourself into a role.
* Only an Owner can give or take the **Owner** role. An organization always keeps one active Owner.
* You can't change your own role, or edit the role you hold. Ask an Owner.
* You can't add yourself to a group unless you are an Owner. A group can carry access to parts of your organization, so joining one would mean granting yourself access.
* Changes to a role reach its holders on their next request.

### Deleting a role

A built-in role can't be deleted. Your own role can't be deleted while:

* someone holds it, including suspended people,
* an open invitation names it, or
* it is the default role.

Give those people another role, withdraw the invitation or pick another default first.

## Errors

| Status | Example message |
| - | - |
| 403 | That role has more access than your own |
| 403 | Only an Owner can give or take the Owner role |
| 409 | A role with that key already exists |
| 409 | Someone holds this role — give them another role first |
| 422 | A key is 2 to 40 lower-case letters, digits or \_, like branch\_manager |
| 422 | A built-in role's name and Aiveth powers are fixed |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.