---
title: "Multi-tenancy"
site: admin
version: 2027.1
versions: "all"
url: https://docs-new.servicely.ai/admin/2027.1/access/roles-and-permissions/multi-tenancy/
type: concept
application: tenancy_core
last_updated: 2026-12-03
commit: 8d233372fa05
---


Multi-tenancy limits which records each user can see by the company or realm the records belong to, on one Servicely instance. Read this before you serve several customers or subsidiaries from one instance. You need the `administrator` role to configure it.

## What multi-tenancy is

Multi-tenancy is a visibility filter. It adds a condition to queries, so a user sees only the records of their own part of the organisation. Everything else is shared: catalog items, SLA definitions and the rest of the configuration are set up once, for every tenant.

## Tenants and realms

| Term | Meaning |
| --- | --- |
| Tenant | A part of your organisation whose records are kept apart from the others, such as a customer, a service provider or a subsidiary. It is not a record. A realm or a company stands for it. |
| Realm | A System realm record. Realms form a tree: each realm has a parent, and a realm with no parent starts a tree. A user's realm is the **System Realm** on their user record. |

## Providers

A System tenancy configuration record chooses how records are filtered and for whom. Its **Provider** is one of these:

<!-- source: tenancy_core/data/AvailableValue?Table=SystemTenancyConfiguration&Field=Provider, 2027.1.10 -->
<!-- code: servicely-core/src/main/kotlin/com/servicely/core/tenancy/providers (company/CompanyHierarchyTenancyProvider.kt:39, realm/RealmHierarchyTenancyProviderAbstract.kt:41, SelfServiceUserTenancyProvider.kt:17), 2027.1.10 -->
| Provider | Filters by | When to use it |
| --- | --- | --- |
| Company hierarchy | The **Company** on users and records, and the tree of parent companies | A small, stable structure in which every tenant is a company. |
| Realm hierarchy | The realm on users and records, and the tree of realms | A larger or growing structure, more levels, or tenants that are not all companies. |
| Self service | Nothing | Never. It applies no filter. |

Nothing is filtered until a configuration is **Active**. Its **Script** then decides which users it applies to. The built-in `admin` account and Servicely Support users are never filtered. Other users with the `administrator` role are filtered like anyone else unless the script leaves them out.

## How visibility works

The provider decides which tables are filtered:

- Realm hierarchy filters only the tables you mark **Is realm separated?**. You might separate incidents, requests and users, and leave knowledge articles shared.
- Company hierarchy filters every table that has a **Company** field.

On a filtered table, a user sees the records of their own realm or company and of others along the tree. You set the direction for each table:

| Direction | The user sees |
| --- | --- |
| Down | Their own realm or company and every one below it. This is the default. |
| Up | Their own realm or company and every one above it. |
| Both | Up and down. |

A user with no realm, or with no company under Company hierarchy, sees none of the filtered records except their own user record. A save is refused when the field that sets a record's realm points to a record the user cannot see.

Tenancy adds to the other security. Roles, permissions and table record restrictions still apply, so a requester who sees only their own tickets still sees only those inside their realm.

You can also give a user or a group sight of other parts of the tree, and limit a part of the tree to users who hold a role. A user who can see more than one realm or company chooses one from a drop-down in the header, and the choice lasts for the session.

## Example

<Image src="asset:screenshots/admin/access-roles-and-permissions-multi-tenancy/realm-tree-example.png">A realm tree with a parent organisation at the top, service providers below it and their customers below them.</Image>

A parent organisation serves service providers, and each service provider serves its own customers. The parent separates its ticket, configuration item and user tables with the direction Down. It separates groups with the direction Both.

| Who | Realm | What they see |
| --- | --- | --- |
| The parent's agents | The parent organisation | Every record of every service provider and customer, because the direction is Down. |
| The parent's requesters | The parent organisation | Only tickets they raised. Their role, not tenancy, limits them. |
| A service provider's agents | Their service provider | Tickets, configuration items and users of their service provider and its customers. They also see the parent's groups, so they can escalate to a parent group without seeing the parent's users. |
| A service provider's requesters | Their service provider | Only tickets they raised, for their service provider or its customers. |

## Plan before you turn it on

Decide which tables to separate and how every record gets its realm or company before you go live. Changing the model later means correcting existing records.

Every record on a filtered table must carry its tenant, or users who are filtered do not see it. For tickets filtered by company, every way of creating a ticket must set **Company**. For incidents, for example:

- a trigger that sets a fallback company
- interactions that need a company
- catalog items that set **Company**, by asking or from **Requested for**
- a mandatory **Company** field on the incident form

[Multi-tenancy configuration](page:access/roles-and-permissions/multi-tenancy-configuration) lists the applications, the records and their fields, and the table settings.

## Related

- [Multi-tenancy configuration](page:access/roles-and-permissions/multi-tenancy-configuration)
- [Permissions](page:access/roles-and-permissions/permissions)
- [Restrict which records a user can see](page:access/roles-and-permissions/restrict-which-records-a-user-can-see)
- [Set up companies, departments and locations](page:access/users-and-groups/organisation)
