Tenant Admins¶
Availability: all tiers · Admin-scoped
See the Tier & Scope Matrix for the full breakdown.
Your account with VirtualSutra AI is a tenant. A tenant holds one or more organizations, and each person has a role in each organization they belong to.
An organization admin manages their own organization. A tenant admin is an organization admin who can also manage the tenant's other organizations and the settings the whole tenant shares.
What a tenant admin can do¶
| Action | Organization admin | Tenant admin |
|---|---|---|
| Manage members, teams and settings of their own organization | Yes | Yes |
| Manage members, teams and settings of another organization of the tenant | No | Yes |
| List all organizations of the tenant | No | Yes |
| Create another organization under the tenant | No | Yes |
| Read, set, test or clear the LLM configuration | No | Yes |
| Open billing checkout or the billing portal | No | Yes |
| Disable or enable a user who also belongs to another organization of the tenant | No | Yes |
| Make someone a tenant admin, or revoke it | No | Yes |
A tenant admin has no access to other tenants.
An organization admin who is not a tenant admin keeps full control of their own organization through the API and the rest of the console. An API request to manage another organization of the tenant is answered as if that organization did not exist.
Settings > Admin > Organizations needs a tenant admin
The Organizations page of the console lists the tenant's organizations, which only a tenant admin may do. An organization admin who is not a tenant admin sees an error there instead of the list, and New Organization is refused when submitted.
Who is a tenant admin¶
- The person who created the tenant. If you signed up yourself, you are its first tenant admin. If the tenant was created for you, the first admin named at creation is.
- On a self-hosted install, an address listed in
AUTH_ADMIN_EMAILSbecomes an admin of the deployment's organization and a tenant admin when it signs in for the first time. Adding an address to the list after that person has already signed in does not make them one. - Anyone a tenant admin has granted it to.
A tenant admin must be an enabled user who is an admin of at least one organization of the tenant. Someone who stops being an admin of every organization of the tenant stops being a tenant admin at the same moment. Making them an organization admin again does not restore it; a tenant admin has to grant it again.
Tenants that existed before this role
When a deployment is upgraded, the admins of each tenant's oldest organization become its tenant admins. If that organization has no enabled admin, the admins of the next-oldest organization that has one are used. Admins of the tenant's other organizations keep their organization and lose the ability to manage the others, the LLM configuration and billing until a tenant admin grants them the role. A tenant with no enabled admin in any organization has no tenant admin after the upgrade; whoever operates the deployment gives it one.
The built-in admin account
On a self-hosted install the built-in admin account (see Authentication) is created as an admin of the deployment's organization and as its tenant's tenant admin, so it can grant the role to others. Password-file (HTPASSWD) sign-in, which kept no user accounts and so could hold no tenant admin, is removed.
Granting and revoking¶
Go to Admin > Tenant. The Tenant Admins section lists the current tenant admins. An organization admin who is not a tenant admin sees a one-line notice there instead of the list.
To grant: choose a person under Add a tenant admin and confirm Make Tenant Admin. Only people who are already an admin of one of the tenant's organizations can be chosen. To grant it to someone else, first make them an admin of an organization under Settings > Admin > Organizations.
To revoke: use Revoke on the person's row. They keep their organization roles and lose the ability to manage the tenant's other organizations.
Every grant and revoke is recorded in the audit log.
The last tenant admin¶
A tenant's last tenant admin who can act cannot be taken away. For that person, each of these is refused:
- revoking the role, including by that person themselves;
- changing their role in, or removing them from, the last organization they are an admin of;
- disabling their account.
Grant the role to another person first, then make the change.
With the API¶
| Request | Effect |
|---|---|
GET /tenants/{tenant_id}/admins | List the tenant's tenant admins |
POST /tenants/{tenant_id}/admins with {"user_id": "..."} | Grant |
DELETE /tenants/{tenant_id}/admins/{user_id} | Revoke |
The caller must be a tenant admin of that tenant. Each entry in the list has usable, which is false when the holder cannot currently act, for example because their account is disabled.
| Answer | Meaning |
|---|---|
403 with tenant_admin_required | You are an admin of an organization of this tenant, but not a tenant admin |
403 "Cannot revoke the last tenant admin of this tenant" | Grant another tenant admin first |
404 "User not found in this tenant" | The user does not exist or belongs to no organization of this tenant |
409 "This user cannot be a tenant admin" | The user is not an admin of any organization of this tenant, or their account cannot act (for example, it is disabled) |
409 with a Retry-After header | Another change to the tenant's admins is in progress. Nothing was changed; try again |
A personal API key acts as its owner, so a tenant admin's key can make these requests if the key carries the admin scope. A service account cannot be a tenant admin, whatever scopes it holds. Requests that need a tenant admin, including the LLM configuration, must be made by a person's console session or personal API key.
Creating organizations under your tenant¶
A tenant admin creates another organization from Settings > Admin > Organizations > New Organization, or with POST /tenants/{tenant_id}/orgs.
By default the tenant admin who creates the organization becomes its first admin. With the API, send "creator_as_admin": false to create it with no member, then add its first admin with POST /orgs/{org_id}/members.
Deleting an organization¶
Deleting an organization removes everything it owns: its runs, findings, reports, schedules, connections, API keys and service accounts. The tenant's own records, such as billing, stay. It cannot be undone, so you confirm it by name.
Who can delete. Only a tenant admin can delete an organization that still has members; the memberships are removed with it. Anyone else, including an organization admin or a platform admin who is not a tenant admin of this tenant, is refused while the organization has members. An organization's last admin cannot be removed, so in practice a tenant admin deletes it. Anyone who was a tenant admin only through an admin membership in the deleted organization stops being a tenant admin.
Confirm by name. In the console, Delete asks you to type the organization's exact name, matching case and spaces. With the API, pass the organization's id or exact name as confirm:
Without confirm the answer is 400 with detail.code confirmation_required. With any other value it is 400 with confirmation_mismatch. Nothing is deleted.
What blocks a delete. A delete is refused while any of these remain:
Blocker (kind) | What to do |
|---|---|
members | Remove every member first. Does not apply to a tenant admin |
teams | Remove every team first |
last_org | This is the tenant's last organization, and a tenant always keeps one. Create another organization first |
unfinished_runs | Cancel the runs, or wait for them to finish |
queued_runs | A resume, rescore or report regeneration is waiting to start. Wait for it to start and finish |
enabled_schedules | Disable or delete the organization's schedules |
open_scan_jobs | A hosted scan agent has a scan job open. Wait for it to finish |
scan_agent_credentials | Disable or delete the service accounts granted scan:agent, and revoke the API keys granted it. Expired ones do not count. Only an explicit scan:agent grant counts: an older API key with no scope list does not block the delete |
active_discoveries | A connection discovery is running. Wait for it to finish |
All of them are reported together in one 409, by kind and count:
{
"detail": {
"code": "org_delete_blocked",
"message": "Cannot delete organization: 2 enabled schedule(s) — disable or delete them first",
"blockers": [{"kind": "enabled_schedules", "count": 2}]
}
}
When a delete is refused this way, the console's confirmation lists the blockers.
Other refusals have a plain sentence as detail:
409"Cannot delete this organization: it holds the only admin membership of the tenant's last tenant admin — grant another tenant admin first".403"Cannot modify a platform administrator": in the operator organization, a member is a platform admin, and only a platform admin can remove them.409"Organization is busy", with aRetry-Afterheader: a run of the organization is being written, or another delete is in progress. Try again.503: the run queue could not be checked, and nothing else blocks the delete. Try again.
Nothing is deleted on any of these.
Records with no organization (older runs, schedules, remediations and API keys, see Admin Console) are not the organization's: a delete neither counts nor removes them.
If the organization is deleted while you are changing its members, teams or group mappings, the change is answered 404 "not found" and nothing is written.
Audit. A completed delete is recorded as org_deleted. A delete refused for its blockers, its confirmation or the tenant's last tenant admin is recorded as org_delete_refused.
See also
- Admin Console: users, organizations, API keys and service accounts
- Teams: scoping what members of one organization can see
- LLM Configuration