Skip to content

User Management

NimbleBrain supports multi-user environments where each person has their own identity, conversations, and workspace memberships. User management is available with the dev adapter (the built-in local identity store) and with the oidc adapter.

How users are managed depends on your authentication configuration in instance.json:

Adapter User management Description
dev Organization → Users "adapter": "dev". Identities live in the built-in local store under users/. No credential is checked and every request is the built-in admin (see Security), but users, roles, and ownership still apply.
oidc External provider Users are managed in your OIDC provider. NimbleBrain creates a local record on first login, or binds one an admin created ahead of time. See Signing in with OIDC.
workos External provider (WorkOS) Identities and sign-in are managed in WorkOS / AuthKit.

Under the oidc adapter, a user’s account is their provider subject: the token’s iss and sub claims. Each sign-in finds the local record in this order:

  1. The record bound to that issuer and subject. A user created at first login is bound when it is created.
  2. A record with the token’s verified email that an admin created ahead of time and no subject is bound to yet. That sign-in binds the record to the subject.
  3. Neither: a new record, as Member, bound to the subject.

Because the subject decides, a user whose email changes at the provider keeps the same account. A record bound to one subject is never matched by email: if the provider gives that email to a different person, their sign-in is refused and logged, and no second record is created.

The binding is stored in the identity field of the user’s users/<id>/profile.json and includes the issuer. If you change issuer in instance.json, users bound to the old issuer are refused. To let one sign in through the new issuer, set identity to <new issuer>#<their sub at the new issuer>; their next sign-in matches it.

A sign-in is accepted only when the token’s email_verified claim is true. The email decides which domains may sign in, which pre-created record a first sign-in claims, and what a new record is created with, so an email the provider has not verified could be anyone’s. A token with email_verified: false, or with no email_verified claim at all, is refused and logged: it claims no record and creates none. Some providers leave the claim out of their tokens by default; configure yours to include it, or every sign-in is refused.

Org admins manage users from Organization → Users (/org/users). The page lists everyone in the organization with their display name, email, org role, and creation date, and flags deactivated users.

  • Create user — enter an email and a display name and pick a role (Member or Admin). Under dev and oidc the user is added to the local identity store; under workos the identity is created in WorkOS.
  • Edit — open a user to change their display name, email, or role (Member or Admin). Each field saves when you finish with it: a name or email on Enter or when you leave the field, a role as soon as you pick it. A save raises a notice with Undo. A change that turns an admin into a member asks first. Deactivated users cannot be edited until they are restored.
  • Deactivate — asks first, then revokes the user’s access at once. You cannot deactivate yourself.
  • Restore — re-enables a deactivated user.

The page disables each control the server would refuse and says why.

The agent cannot manage users. The page calls the nb__manage_users tool, which is app-only: it never appears in the agent’s tool list or in an external MCP client’s tools/list.

nb__manage_users supports these actions:

Action What it does
create Create a user (requires email and displayName; optional orgRole, default member)
update Change a user’s email, displayName, or orgRole
delete Deactivate a user (soft delete) — revokes sign-in, keeps the record
restore Re-enable a previously deactivated user
list List all users

update refuses:

  • your own role, so an admin never demotes themselves out of managing the org (you can still change your own name, and your email where the adapter allows it);
  • the role of the last active admin;
  • any edit to a deactivated user;
  • an empty display name or email, or an email another user already has.

Where an edit is written depends on the adapter:

Adapter Display name Email Role
dev Local store Local store Local store
oidc Local store Not editable: sign-in falls back to matching a user by email, so an editable email would let an admin redirect someone’s sign-in Local store
workos WorkOS (first and last name), then local Not editable: AuthKit signs people in by email, so change it in WorkOS Sets the user’s WorkOS organization role, then local

Under workos, making someone an admin sets their organization role to the first slug in auth.adminRoleSlugs (default admin), and making them a member sets it to member. Both roles must exist in your WorkOS environment, or the save fails with WorkOS’s reason.

Under dev, every request is the built-in developer. Its display name and preferences (timezone, locale, theme, model) come from its stored record, so a change you make in your profile or through nb__set_preferences applies from the next request. Its ID, email, and role do not: editing them changes the stored record, but you are still signed in as usr_default, an org admin.

Every user has one org-level role:

Org role Can manage users Description
admin Yes Full administrative control: manages users, every workspace, and organization settings.
member — Standard user. Chats and uses tools; cannot manage other users.

Deactivating is a soft delete: the user can no longer sign in, but their record stays, so they are listed as deactivated (in the Users page and in workspace member lists) and can be restored with the same ID and memberships. It does not delete the underlying provider identity, which would be irreversible and would orphan their workspace memberships.

Org roles control who can manage users. Workspace membership controls who can use a given workspace’s apps and tools. A user can belong to multiple workspaces, with a per-workspace role of admin or member.

Manage membership from the workspace’s Settings → Members: add someone in the organization by email, change a role, or remove someone. The agent cannot do this for you; the manage_workspaces tool behind that page is app-only.

Workspace member management requires admin membership in that workspace, or an org role of admin, which can manage the members of any workspace. Workspace roles:

Workspace role Manage members Install connectors Chat & use tools
admin Yes Yes Yes
member — — Yes

See Workspaces for more on creating workspaces and assigning members.

User management is controlled by the userManagement feature flag, which defaults to true. To disable:

nimblebrain.json
{
"features": {
"userManagement": false
}
}

When disabled, the nb__manage_users tool is not registered, so the Users page cannot load or change users.

  • Workspaces — assign users to workspaces with roles
  • Connectors — shared services within a workspace