Skip to content

UseTenantsReturn

PropertyTypeDescription
createTenant(options) => Promise<Tenant>Create a new tenant (instance admin only)
currentTenantIdstring | undefinedGet the current tenant ID
deleteTenant(id) => Promise<void>Delete a tenant (instance admin only)
errorError | nullAny error that occurred
isLoadingbooleanWhether tenants are being fetched
refetch() => Promise<void>Refetch tenants
setCurrentTenant(tenantId) => voidSet the current tenant context
tenantsTenantWithRole[]Array of tenants the user has access to
updateTenant(id, options) => Promise<Tenant>Update a tenant (tenant admin only)