> 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/users.md).

# Users

Create and manage OctoXLabs user accounts, assign groups, unlock accounts and reset two-factor authentication.

**Users** lists every account that can sign in to the current company. Use it to create accounts, give people access through groups, deactivate or delete accounts, and help users who are locked out or lost their authenticator.

### Before you begin

* Required role: an administrator account. The permissions for this page (`users.view_user`, `users.add_user`, `users.change_user`, `users.delete_user`) are administrator-only and cannot be added to a group.
* Create the groups first if you want to give the new user access. A user with no group sees no data.
* For directory users, set up LDAP first. For single sign-on, see SSO.

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

### The user list

Type in the search box and press Enter to search by username, first name, last name or e-mail. Click a column header to sort.

| Column              | Meaning                                                                      |
| ------------------- | ---------------------------------------------------------------------------- |
| **Username**        | The sign-in name.                                                            |
| **Name**            | First and last name.                                                         |
| **E-Mail**          | The e-mail address.                                                          |
| **2FA Enabled**     | Whether the user has set up two-factor authentication.                       |
| **LDAP User**       | Whether the password is checked against your directory instead of OctoXLabs. |
| **Active**          | Whether the account can sign in.                                             |
| **Last Login Time** | The last successful sign-in.                                                 |

Each row has edit and delete actions. The built-in `system` account and company administrator accounts (names ending in `(CA)`, see Companies) are not listed.

### Create a user

{% stepper %}
{% step %}

#### Open the form

Click **Create User**. The button appears only if your role has `users.add_user`.
{% endstep %}

{% step %}

#### Fill in the account

Enter **Username**, **First Name**, **Last Name** and **E-Mail**. First and last name accept letters and spaces only. Leave **Active** selected so the user can sign in.
{% endstep %}

{% step %}

#### Set the sign-in method

For a local account, enter **Password** and **Password Confirmation**. A password is required for new local users and must meet the password rules. For a directory account, select **LDAP User**: the password fields are disabled and the password is checked in your directory. You cannot change **LDAP User** after the account is created.
{% endstep %}

{% step %}

#### Choose groups and save

Under **Groups**, move groups from **Available Groups** to **Selected Groups**, then click **Create**.
{% endstep %}
{% endstepper %}

### Edit, deactivate or delete a user

Click the edit action on a row. The form is the same as for creating a user, with these differences:

* Leave **Password** empty to keep the current password. Enter a new one to replace it (not possible for LDAP users).
* Clear **Active** to block sign-in without deleting the account. Select it again to re-enable the account.
* Under **Groups**, add or remove groups to change what the user can do. Groups apply to standard users only; an administrator account cannot be put in a group.
* A **Two Factor Authentication** section shows the user's 2FA state (see below).

Use the delete action to remove an account. The last active administrator cannot be deleted, demoted or deactivated.

### Two-factor authentication for a user

On the edit page, the **Two Factor Authentication** section shows one of these messages:

| State                                               | What you can do                                                                                         |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| 2FA not enabled for this user                       | Nothing to do here. The user enables it in their own Account Settings.                                  |
| 2FA enabled                                         | **Disable 2FA** turns it off. **Reset 2FA** clears it so the user sets it up again at the next sign-in. |
| **Mandatory 2FA** on and the user has set it up     | **Disable 2FA** is unavailable. **Reset 2FA** still works.                                              |
| **Mandatory 2FA** on and the user has not set it up | The user is held in the setup flow at the next sign-in until they finish.                               |

**Mandatory 2FA** is a platform-wide switch in Advanced Settings. Use **Reset 2FA** when a user loses their authenticator device.

### Password and lockout rules

| Rule                | Value                                                                                                                                                                              |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Minimum length      | 12 characters                                                                                                                                                                      |
| Required characters | At least one lowercase letter, one uppercase letter, one digit and one special character                                                                                           |
| Not allowed         | Passwords too similar to the user's other details, common passwords, and all-numeric passwords                                                                                     |
| Password expiry     | Set **Password Expire Days** in Advanced Settings. `0` means unlimited. Does not apply to LDAP users.                                                                              |
| Lockout             | After 10 failed sign-ins within 15 minutes, a non-administrator account is deactivated and an account-locked activity is recorded. Administrator accounts are not locked this way. |

{% hint style="info" %}
To unlock an account, open the user, select **Active** and click **Save**. Reactivating clears the failed attempts. Users can see their own recent failures under **Failed Login Attempts** in Account Settings.
{% endhint %}

### Verify the result

* The user appears in the list with **Active** set as you expect.
* The user can sign in and sees only the pages that their groups allow.
* For an LDAP user, **LDAP User** is set and sign-in works with the directory password.

### Troubleshooting

| Symptom or error message                                                                            | Cause                                                                                      | Fix                                                                                                             |
| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- |
| **Users** or the **Create User** button is missing                                                  | The role lacks the administrator-only user permissions.                                    | Sign in as an administrator.                                                                                    |
| `Password is required.`                                                                             | A new local user was saved without a password.                                             | Enter **Password** and **Password Confirmation**, or select **LDAP User**.                                      |
| `Passwords do not match`                                                                            | The two password fields differ.                                                            | Re-enter both.                                                                                                  |
| `This password must contain at least one ...`                                                       | The password lacks a required character type.                                              | Add the missing lowercase letter, uppercase letter, digit or special character, and use at least 12 characters. |
| `This username is not available.`                                                                   | Usernames ending in `(CA)` are reserved for company administrators.                        | Choose another username.                                                                                        |
| `Groups can only be assigned to normal users.`                                                      | You tried to add groups to an administrator or auditor account.                            | Remove the groups, or use a standard account.                                                                   |
| `The last admin user cannot be deleted.` or `The last admin user cannot be demoted or deactivated.` | Only one active administrator is left.                                                     | Create or keep another active administrator first.                                                              |
| `OTP cannot be disabled while mandatory OTP is active.`                                             | **Mandatory 2FA** is on.                                                                   | Use **Reset 2FA** instead, or turn off **Mandatory 2FA** in Advanced Settings.                                  |
| A user cannot sign in and **Active** is cleared                                                     | The account was locked after repeated failed sign-ins, or an administrator deactivated it. | Select **Active** and save.                                                                                     |

### 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>Groups</strong></td><td>Build the permission sets you assign to users.</td><td></td></tr><tr><td><strong>Companies</strong></td><td>Run separate tenants on one installation.</td><td></td></tr><tr><td><strong>LDAP</strong></td><td>Sign in with directory accounts.</td><td></td></tr><tr><td><strong>Account Settings</strong></td><td>What users manage themselves.</td><td></td></tr></tbody></table>
