Skip to Content
GuidesUser ManagementManaging Users

Managing users

User administration manages native Auris profiles within the selected tenant. Creating a profile is separate from granting Console membership, organization membership, or application permissions.

Use an authenticated server-side request and the intended x-tenant context. Listing and reading require view:users; creation, updates, deletion, restoration, and role changes require manage:users. A header alone never grants access.

In the Console

  1. Open Users in the intended tenant. Search by name, email, or username; the Console starts with 20 rows per page. Do not rely on the role filter to authorize or verify membership.

  2. Choose Create User and enter email and first name (required), plus last name if available. The current create dialog has no invitation toggle or role-assignment tab.

  3. Save the profile, then manage role assignments separately through the user’s role controls. Confirm an enabled sign-in method and explicit access for the intended application.

The Console hides the password field when passwordless configuration is enabled. If configuration is disabled or cannot be loaded, the current dialog may still display and require a password for compatibility. The API ignores that value on creation: it is not a working initial password.

Create a user

POST /api/users

Creates an Auris database profile. Required fields are email and name; the API does not create an account in an external credential store and does not send an invitation email.

{ "email": "[email protected]", "name": "Bob", "surname": "Jones", "username": "bob", "enabled": true }
  • email: Email address; must be unique in the tenant.
  • name: Given name; required.
  • surname: Family name; optional.
  • username: Optional; defaults to the normalized email address.
  • enabled: Optional; defaults to true.
  • password: Compatibility field only: ignored and never stored. Omit it.

Use name and surname in create/update requests. The list/read response also exposes firstName and lastName. roles, roleIds, metadata, and sendInvite are not creation fields; assigning roles is a separate request.

Administrative creation is passwordless. It does not require a password reset or automatically email a setup link. The user needs an enabled sign-in method, such as a magic link, WebAuthn, or an identity provider. Configure that method before onboarding.

Example success response (HTTP 201):

{ "success": true, "message": "User created successfully", "userId": "usr_example", "user": { "id": "usr_example", "email": "[email protected]", "name": "Bob", "surname": "Jones", "enabled": true } }

List users

The list returns success, users, and pagination. Search matches email, username, first name, last name, or subject ID. The native list does not apply the role filter and returns an empty roles summary; read actual assignments with the roles endpoint.

GET /api/users?page=1&limit=20&status=enabled GET /api/users/{userId} GET /api/users/{userId}/roles

Update a user

Accepts email, name, surname, and enabled. Only supplied fields are updated. username, roles, and arbitrary metadata are not updated by this endpoint. Disabling a user or changing their email triggers session revocation; revocation failure is an error. You cannot disable your own account.

A nonempty compatibility password field on update requests forces re-authentication; it does not set a password. The legacy /reset-password endpoint likewise revokes sessions and records re-authentication metadata, without storing the supplied password.

Assign and remove roles

Read roles with GET. POST assigns the names in roleNames; DELETE removes those names. This changes the specified assignments rather than replacing the entire role set. Role hierarchy is enforced, and a partial result can return HTTP 207: inspect assignedRoles or removedRoles and failedRoles.

POST /api/users/{userId}/roles Content-Type: application/json {"roleNames":["viewer"]}

Delete and restore

DELETE disables the native profile, revokes sessions, and records a recoverable deletion. POST to the deleted-user route restores the account while its retained record is available. DELETE on that deleted-user route is permanent. These are separate operations; restoration does not recreate revoked sessions or grant new permissions.

DELETE /api/users/{userId} POST /api/users/deleted/{userId} DELETE /api/users/deleted/{userId}

Permanent deletion cannot be undone. Review the account and required retention before invoking it. A successful API call alone is not a legal compliance assessment.

Sessions

Use GET /api/admin/sessions?userId={tenantUserId} to inspect recorded sessions and DELETE /api/admin/sessions/{sessionId} to revoke a recorded session; these require manage:sessions. Here userId is the internal tenant-user ID, not the profile subject ID returned as id by /api/users. For account-wide native force re-authentication, use the administrative lifecycle operations described above.

Server-side integration

The example below uses the REST contract directly. Keep administrative tokens on the server. Check your SDK version against these field names before replacing this request with a management helper; do not reuse a password-based create-user example.

const response = await fetch(`${process.env.AURIS_API_URL}/api/users`, { method: 'POST', headers: { Authorization: `Bearer ${adminAccessToken}`, 'x-tenant': tenantSlug, 'Content-Type': 'application/json', }, body: JSON.stringify({ email: '[email protected]', name: 'Carol', surname: 'Smith', enabled: true, }), }) const result = await response.json() if (!response.ok || !result.success) { throw new Error(result.error || 'User creation failed') } const userId = result.userId

Import and export

Bulk jobs are separate from native profile CRUD and require admin:all. Import accepts CSV/JSON files up to 5 MiB; poll the job route and inspect row errors. Exports must complete before download. The current bulk workflow retains a legacy provider dependency: confirm compatibility with the target environment before planning a native-user migration. Creating a job is not proof of a completed migration.