Switching Tenants
Navigate between tenants efficiently in Lens.
Quick Tenant Switch
Section titled “Quick Tenant Switch”Header Selector
Section titled “Header Selector”The fastest way to switch tenants:
┌─────────────────────────────────────────────────────────────┐│ ┌──────────────────────────────────────────────────────┐ ││ │ MANTIS [Acme Corp ▼] │ ││ │ Context: Acme │ ││ │ ─────────────────│ ││ │ │ Search… │ │ ││ │ │ ──────────── │ │ ││ │ │ ★ Favorites │ │ ││ │ │ Acme Corp ★ │ │ ││ │ │ ──────────── │ │ ││ │ │ Recent │ │ ││ │ │ Beta Inc │ │ ││ │ │ ──────────── │ │ ││ │ │ Gamma LLC │ │ ││ │ │ Delta Co │ │ ││ │ │ ──────────── │ │ ││ │ │ All Tenants │ │ ││ │ └──────────────┘ │ ││ └──────────────────────────────────────────────────────┘ │└─────────────────────────────────────────────────────────────┘- Click the tenant name in the header
- Search or scroll to find the tenant — the dropdown shows Favorites first, then Recent (last 5), then the full list
- Click the tenant name to switch; click ★/☆ on a row to pin or unpin it as a favorite
- A
Context: <name>indicator appears below the button confirming the active tenant
Keyboard Shortcut
Section titled “Keyboard Shortcut”| Shortcut | Action |
|---|---|
Ctrl+K / Cmd+K | Open quick switcher |
| Type tenant name | Filter list |
↑ / ↓ | Move selection |
Enter | Select tenant |
Esc | Cancel |
The quick-switcher opens a centered command palette with the same Favorites → Recent → full list ordering as the header dropdown.
From Tenant List
Section titled “From Tenant List”Direct Navigation
Section titled “Direct Navigation”- Go to Tenants in sidebar
- Find the tenant row and click Set as context — or click through to the tenant detail page and use the Set as context button there
- When a tenant is the active context its button changes to Active context ✓ with a Clear button beside it
┌─────────────────────────────────────────────────────────────┐│ Tenants │├─────────────────────────────────────────────────────────────┤│ ││ ┌───────────────┬──────────────┬───────────────────────┐ ││ │ Name │ Description │ Actions │ ││ ├───────────────┼──────────────┼───────────────────────┤ ││ │ Acme Corp │ Enterprise │ [Active context ✓][Clear] ││ │ Beta Inc │ SMB customer │ [Set as context] │ ││ │ Gamma LLC │ Startup │ [Set as context] │ ││ └───────────────┴──────────────┴───────────────────────┘ ││ │└─────────────────────────────────────────────────────────────┘Clear Tenant Context
Section titled “Clear Tenant Context”View All Tenants
Section titled “View All Tenants”To see data across all tenants, select All Tenants (no filter) at the bottom of the header dropdown or command palette. This clears the active tenant context.
┌─────────────────────────────────────────────────────────────┐│ Tenant Selector │├─────────────────────────────────────────────────────────────┤│ ││ ● Acme Corp (current) ││ ○ Beta Inc ││ ○ Gamma LLC ││ ───────────────────────────────────────────────────────── ││ ○ All Tenants (no filter) ││ │└─────────────────────────────────────────────────────────────┘The active tenant context is a Lens UI concept selected from the tenant switcher;
it is not a mantisctl command. CLI and API calls scope to a tenant per command
via the tenant ID (see CLI Tenant Selection below).
Recent Tenants
Section titled “Recent Tenants”Quick Access
Section titled “Quick Access”Lens remembers the last 5 tenants you switched to. They appear in the Recent section of the dropdown and command palette whenever you have no search query active. Recent history is stored per-user in localStorage and survives browser restarts.
┌─────────────────────────────────────────────────────────────┐│ Switch Tenant │├─────────────────────────────────────────────────────────────┤│ ││ Recent: ││ ○ Acme Corp (current) ││ ○ Beta Inc ││ ○ Gamma LLC ││ ││ ───────────────────────────────────────────────────────── ││ ││ All Tenants: ││ ○ Alpha Co ││ ○ Delta Inc ││ ○ Epsilon Ltd ││ ... ││ │└─────────────────────────────────────────────────────────────┘Favorites
Section titled “Favorites”Pin frequently used tenants so they always appear at the top of the list:
┌─────────────────────────────────────────────────────────────┐│ Tenant Selector │├─────────────────────────────────────────────────────────────┤│ ││ ★ Favorites: ││ ○ Acme Corp ★ ││ ○ Beta Inc ★ ││ ││ Recent: ││ ○ Gamma LLC ││ ││ All: ││ ○ Delta Co ││ ... ││ │└─────────────────────────────────────────────────────────────┘To favorite a tenant, click the ★/☆ icon on any tenant row in the dropdown or command palette. Clicking again removes the pin. Favorites are stored per-user in localStorage and survive browser restarts.
URL-Based Switching
Section titled “URL-Based Switching”Direct Links
Section titled “Direct Links”A ?tenant=<id> query parameter scopes a single view to that tenant without writing the session cookie. The context reverts to the persisted cookie value as soon as you navigate to a URL that omits the parameter.
# Deployments scoped to a specific tenant for this view onlyhttps://lens.example.com/deployments?tenant=01890a5d-ac96-774b-b001-3a17f4029de3
# Targets scoped to a specific tenant for this view onlyhttps://lens.example.com/targets?tenant=01890a5d-ac96-774b-b001-4b28051340fcThese links are useful for sharing a specific filtered view with another admin. The recipient’s persistent tenant context (session cookie) is not changed.
Bookmarks
Section titled “Bookmarks”Save URLs with tenant context:
Bookmarks:├── Beta Deployments → lens.example.com/deployments?tenant=01890a5d-ac96-774b-b001-3a17f4029de3└── All Targets → lens.example.com/targetsCLI Tenant Selection
Section titled “CLI Tenant Selection”Tenant-aware commands take a numeric --tenant-id. There is no session-context
or target list subcommand in mantisctl; use the flags per command.
# Deploy to a specific tenantmantisctl deployment create --solution-id customer-portal \ --tenant-id 42 \ --environment-id Production
# List deployments (optionally filter by tenant ID)mantisctl deployment list --tenant-id 43
# Show a deployment's statusmantisctl deployment show abc123Admin-Only Feature
Section titled “Admin-Only Feature”The tenant switcher — header dropdown, command palette (Ctrl+K/Cmd+K), and Set as context buttons — is only visible to global administrators. Regular tenant users are always scoped to their own tenant and never see these controls.
Best Practices
Section titled “Best Practices”1. Use Keyboard Shortcuts
Section titled “1. Use Keyboard Shortcuts”For frequent switching:
Ctrl+K/Cmd+K→ Quick switch- Type first few letters → Filter
Enter→ Select
2. Favorite Key Tenants
Section titled “2. Favorite Key Tenants”Pin your primary tenants for quick access.
3. Use Direct Links for One-Off Views
Section titled “3. Use Direct Links for One-Off Views”When you need to look at a specific tenant’s data without changing your active context, use a ?tenant=<id> URL. Navigate away and your context is unchanged.
4. Verify After Switching
Section titled “4. Verify After Switching”Always confirm the active tenant before actions:
- Check the header shows the correct tenant name
- Confirm the
Context: <name>indicator below the button - Double-check before triggering deployments
Troubleshooting
Section titled “Troubleshooting”Cannot Find Tenant in Selector
Section titled “Cannot Find Tenant in Selector”Cause: Tenant doesn’t exist or hasn’t been created yet
Solution:
- Verify tenant name spelling
- Ensure the tenant hasn’t been deleted
- Check with your administrator
Context Doesn’t Persist
Section titled “Context Doesn’t Persist”Cause: Session cookie blocked or browser set to clear cookies on close
Solution:
- Check that cookies are enabled for the Lens domain
- Re-authenticate if your session expired
- Use
?tenant=<id>URL parameters for a view-scoped workaround
Wrong Tenant Data Displayed
Section titled “Wrong Tenant Data Displayed”Cause: Stale cache or context not updated
Solution:
- Refresh the page
- Clear context (select All Tenants) and re-select
- Check the URL for a
?tenant=parameter that may be overriding the cookie
Next Steps
Section titled “Next Steps”- Tenant Context - Working in tenant scope
- Tenant Variables - Configure values
- Overview - Return to tenants overview
