> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/documentation/use-octoxlabs/settings/account-and-tenant-management/groups.md).

# Groups

Define roles as groups of permissions and adapters, add users to them, and understand the protected default groups.

**Groups** is where OctoXLabs roles are defined. A group is a named set of permissions, optionally limited to certain adapters, with users as members. A user's access is the sum of the groups they belong to. Use groups to give analysts read access to inventories, give a team the right to build reports, or restrict a team to the data of specific adapters.

### Before you begin

* Required role: an administrator account. The group permissions (`auth.view_group`, `auth.add_group`, `auth.change_group`, `auth.delete_group`) are administrator-only.
* Create the users first, or add them from this page after you save the group.

Go to the gear icon in the top bar > **Settings** > **Account and Tenant Management** > **Groups**.

### How roles and groups work

| Account type  | Access                                                                               |
| ------------- | ------------------------------------------------------------------------------------ |
| Administrator | Not limited by groups. Has every permission and sees all adapters.                   |
| Auditor       | Sees all adapters. Groups cannot be assigned to this account type.                   |
| Standard user | Only what the user's groups grant. A standard user with no group has no permissions. |

Groups can be assigned to standard users only. Permissions that manage the platform itself are never offered in a group, so only administrators can use them: groups, companies, connectors, SSO, API tokens (the `authtoken` module), users, export/import, and the LDAP, SMTP, Syslog, licence, company logo and advanced configuration pages.

Permissions for modules that your licence does not include are also hidden from the picker. When you add a module to your licence, the **Auditors** and **Administrators** groups are updated automatically; update your other groups yourself.

### The group list

The list shows **Name**, **Protected** and **User Count**. Search by group name or permission name. Select rows and use **Actions** > **Export Selected Items** to export groups (needs the export/import permission; see Export / Import).

### Create a group

{% stepper %}
{% step %}

#### Name the group

Click **Create Group** and enter **Group Name**. HTML in the name is rejected.
{% endstep %}

{% step %}

#### Pick permissions

Under **Permissions**, move items from **Available Permissions** to **Selected Permissions**. Use the module drop-down (default **All**) to filter by module, or search by name or by key such as `queries.view_query`. To start from an existing role, choose a group in **Select group to fill permissions**: its permissions are added to your selection.
{% endstep %}

{% step %}

#### Save

Click **Create**. OctoXLabs opens the group in edit mode, where you can add adapters and users.
{% endstep %}
{% endstepper %}

Permissions follow the pattern `module.action_object`, for example `queries.add_query`. Selecting an action that needs another permission selects that one too: for example adding `queries.add_query` also selects `queries.view_query`, and `reports.add_report` also selects the report schedule and query view permissions. The same rule is applied again when you save.

### Limit a group to adapters

After the group exists, open it and use **Adapters** to move adapters from **Available Adapters** to **Selected Adapters**. Use the adapter group drop-down to narrow the list. The selection limits whose data the members can see. If the selection covers every adapter, there is no restriction.

### Add users to a group

In the edit page under **Users**, search with **Search user to add into group** and pick a user. The user appears in the table. Remove a user with the delete action in the table, then click **Save**. You can also assign groups from the user form in Users.

### Protected groups

OctoXLabs ships these groups. They show **Protected** in the list.

<details>

<summary>Protected group names</summary>

* OctoXLabs Device Management
* OctoXLabs Software Management
* OctoXLabs Vulnerability Management
* OctoXLabs User Inventory Management
* OctoXLabs Source Code Management
* OctoXLabs AI Inventory Management
* OctoXLabs Domain Management
* OctoXLabs Policy Inventory Management
* OctoXLabs Web App Inventory Management
* OctoXLabs Certificate Management
* OctoXLabs Service Management
* OctoXLabs License Management
* OctoXLabs Report Management
* OctoXLabs Workflow Management
* OctoXLabs Dashboard Management
* OctoXLabs Adapter Management
* OctoXLabs API Management

</details>

You cannot delete a protected group, rename it, or change its permissions or adapters. You can still add and remove its members. Other groups cannot reuse a protected group's name. To adapt one, create a new group and use **Select group to fill permissions** to copy it.

### Permission modules

The module drop-down in the picker uses these names.

<details>

<summary>Module names</summary>

Activities, Adapters, API, Query AI, Software Inventory, Audit Logs, Groups, API Tokens, AVM, Certificates, Companies, Settings, Connectors, Contexts, Customs, Dashboards, Dependency Map, Devices, Discovery, Explorers, License Management, Device Profile Policies, Device Profiling, Queries, Reports, Services, SSO Providers, Source Codes, AI Services, Users, Domains, Widgets, Workflows.

Only modules with assignable permissions for your licence and role appear.

</details>

### Verify the result

* The group appears in the list with the expected **User Count**.
* A member signs in and sees only the menu items and actions that the group allows.

### Troubleshooting

| Symptom or error message                                 | Cause                                                               | Fix                                        |
| -------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------ |
| `You cannot delete protected groups.`                    | The group is one of the shipped groups.                             | Leave it, or create your own group.        |
| `Protected groups cannot be edited.`                     | You changed the name, permissions or adapters of a protected group. | Copy it into a new group instead.          |
| `Protected groups' name cannot be used in other groups.` | The new name equals a protected group name.                         | Pick another name.                         |
| `Admin only permissions cannot be assigned to groups.`   | A permission that only administrators may hold was submitted.       | Remove it. Administrators already have it. |
| `Groups can only be assigned to normal users.`           | You added an administrator or auditor to the group.                 | Remove that account from the group.        |
| `User is already in the group`                           | The user is already a member.                                       | Pick another user.                         |
| A permission is not in the list                          | It is administrator-only, or its module is not in your licence.     | Check the licence in Product Licence.      |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Users</strong></td><td>Create accounts and assign these groups.</td><td></td></tr><tr><td><strong>Companies</strong></td><td>Separate teams with tenants instead of groups.</td><td></td></tr><tr><td><strong>Product Licence</strong></td><td>See which modules your licence enables.</td><td></td></tr><tr><td><strong>Export / Import</strong></td><td>Move permission groups between installations.</td><td></td></tr></tbody></table>
