Multi-tenant access control for MSOs in Medplum

A practical guide for MSOs and platform teams on serving several clinics or care teams from one Medplum project, with the tenant labels and access policy pattern that keep records apart.

On this page

Multi-tenant access control for MSOs in Medplum: when one project is enough

An MSO or platform lead who serves several clinics from one Medplum deployment can run them in a single project only if the design rests on three parts: a tenant resource that represents each clinic, a consistent tenant label on every record that belongs to a clinic, and access policies that use that label to limit what each user can see. The label protects nothing unless a policy reads it, so tagging data without enforcing the tag leaves every clinic exposed to every other. Start by listing each resource type that carries patient or clinic data, then confirm with Medplum's access policy documentation which fields your policies can match on. Make the label mandatory on writes, because a record saved without one will fall outside every tenant's policy and may be visible to the wrong users.

One project fits when the clinics share an operating model: the same identity provider, the same project administrators, the same code systems, Bots and profiles, and a compliance boundary the operator can defend for all of them. It also fits when the clinics are expected to share aggregate reporting across the network. Separate projects, or separate servers, become the better choice when a clinic needs its own administrators, its own settings and secrets, a different retention or contractual obligation, or a clean way to leave the network without touching other clinics' records. The main risk is project administrators. Confirm with Medplum how broad project-level rights interact with your policies, because an administrator account may be able to read across tenants regardless of how the policies are written. The sibling topics on the tenant selector pattern and on project isolation cover the user experience and the isolation model in more depth.

Before committing, run a pilot with two illustrative clinics and write the test as a checklist. A user from clinic A should find only clinic A patients, observations and documents when searching, and should be unable to change clinic B's tenant membership or labels. Then test the paths where labels most often leak: records created by Bots, bulk imports, interface traffic from the HL7 client, and binary files, which need their own handling. Ask Medplum for written confirmation of each policy feature your design depends on, and record which team owns tenant label assignment, so a clinic added later is labeled correctly from its first record.

Choosing the tenant resource and labeling strategy

A custom Tenant resource is a resource type defined in your own data model that represents each clinic or care team. Every clinical record carries a reference to the Tenant that owns it, and access policies compare that reference with the tenants the signed-in user may see. Everything stays in one Medplum project, so shared configuration, code systems and Bots are available to all tenants without any linking.

  • Labeling: Each Patient, Encounter and other clinical resource gets a tenant reference, set by the Bot, integration or form that writes it. Records without the tag must be found and fixed before go-live.
  • User assignment: A user record or membership resource lists the tenants that user may access. Your admin workflow maintains this list, so it needs an owner and an audit trail.
  • Adding a clinic: Create the Tenant, assign its users, and tag all incoming data. Historical records for the new clinic need a backfill with the tag.
  • Leaving a clinic: Mark the Tenant inactive, remove user assignments and decide who may still read historical records under your retention rules.
  • Main control: Policies are written once per resource type, so testing each type against the tag is the main safeguard.

Check that your access policies compare the tag on every resource type you store, including Binary files and any custom resources, before the first clinic goes live.

Tenant configuration options and when each fits

This table compares three ways to serve several clinics or care teams on Medplum: one project with tenant labels, one project per tenant, and separate servers. Read each row against your MSO's contracts, shared content needs and staffing, then confirm the open points with Medplum before you commit to a design.

OptionIsolation strengthAdmin effortShared resources and when it fits
One project with tenant labelsLogical only: access depends on access policies that filter by a tenant reference on each resourceLower day to day, but every policy and label must be tested as tenants are addedShared terminology and staff can live in one place; fits MSOs with closely related clinics and a central admin team
One project per tenantStronger separation: users, settings, secrets and data sit in separate projectsHigher: each project needs its own users, configuration and promotion pathShared content must be handled through project linking; fits tenants with distinct compliance or contract boundaries
Separate Medplum servers per tenantStrongest infrastructure separation, with each deployment isolated at the server levelHighest: each server needs its own deployment, upgrades, backups and monitoringFits tenants that require separate hosting, data residency or independent upgrade windows; confirm the cost of operating several servers
Shared access policies across tenantsDepends on how policies scope each user to a tenant referenceModerate: policy changes apply to every tenant that matches the ruleWorks only if every resource type carries a tenant label; confirm which resource types your data model requires
Binary files and attachmentsBinary resources bypass compartment policies unless securityContext is setModerate: each upload needs a labeled security contextConfirm how your tenant label is applied to every binary before choosing any option above
Confirm with MedplumAsk how isolation between projects is enforced on your chosen hosting optionAsk which settings, secrets and users stay per projectAsk whether your hosting tier and identity provider setup support the option you pick

Setting up tenant labels, user assignment and access policies

This sequence labels every record with the tenant that owns it, assigns each user to the tenants they work for, and enforces that match in an access policy. Each step ends with a check, so the team can confirm the controls work before any clinic's data goes live.

  1. Define the tenant model

    The platform owner decides how each clinic or care team is represented in Medplum before any data is loaded. A common approach is one Organization resource per tenant, with its ID recorded in a shared register that clinical, IT and compliance leads sign off. Confirm in your Medplum version which resource and reference field the access policy criteria can compare, because that choice constrains every later step. The step is done when each tenant has a stable identifier and a named owner.

  2. Add tenant references to clinical resources

    Data entry, integrations and the migration pipeline stamp every Patient and clinical resource with the tenant it belongs to, using the reference field chosen in the previous step. Build this into the import mapping or Bot logic so that no record can be created without a tenant. To check it, create one test Patient per tenant and read each back, confirming the tenant reference matches the tenant that created it. Records with an empty or unknown tenant should fail the load and be investigated before go-live.

  3. Create users with tenant assignments

    An administrator creates each user as a member of the Medplum project and links that membership to the tenant they work for, using the membership and profile fields your version supports. Keep one login per person and avoid shared accounts, so audit entries name a single actor. Assign only the tenants each person needs and record those assignments in the same register as the tenant IDs. The check is to view the membership for a sample of users and confirm each shows exactly the intended tenant.

  4. Write access policies that compare tenants

    Write an access policy that lets a user read and write a resource only when the resource's tenant reference matches the tenant on the user's membership. Use the criteria syntax for the Medplum version you run, and confirm whether the policy can take the user's tenant as a parameter, so one policy serves every clinic without a copy per tenant. Grant resource types explicitly so that anything not listed is denied. The step is done when the policy is saved, attached to the memberships, and reviewed line by line by a second person.

  5. Test with a user from each tenant

    Sign in as a test user from each tenant and run the same searches and reads against records from both tenants. Confirm that a user can read a Patient from their own tenant, and that a read of another tenant's Patient returns no result or an access error. Repeat the test for writes, such as updating an Encounter that belongs to the other tenant, and check that search results do not leak counts or linked records. Run these tests in a non-production project first, then record the user, record and observed response for each test.

  6. Retest after every policy or user change

    Repeat the cross-tenant tests whenever a policy, membership, tenant reference or Medplum version changes, and before each production release. Include paths that can bypass record-level rules, such as binary files, GraphQL queries and Bots, and test each one separately, since each has its own access behavior. Review audit logs for denied cross-tenant attempts as part of the same check. The step closes when the full test set passes on the current configuration and the results are filed with the tenant register.

How a request is checked against tenant policies

The diagram starts with a clinic user signing in through Medplum Auth, which issues the token that the FHIR API receives with each request. Before any resource is returned, the access policy compares the tenant on the user's side with the tenant label on the requested resource. A match leads to an allow, and a mismatch leads to a deny. Check that every resource type in scope carries the tenant label and that the policy tests it, because an unlabeled resource can be where cross-tenant exposure starts.

Shows the sign-in path and the tenant comparison that allows or denies each FHIR request.

Security risks in a shared multi-tenant Medplum project

A shared Medplum project puts several clinics or care teams behind one set of users, policies and stored data. The risks below share one root cause: a boundary between tenants that exists only if every resource, user and export carries it correctly. Check each one before go-live and again after every change to policies or users.

Missing tenant label on a resource

If a resource is saved without the tenant label your access policies key on, it may be invisible to the clinic that owns it or, worse, visible to a tenant that should never see it. In a shared project this is the most common way data crosses a boundary, because the write succeeds and nothing fails loudly. Confirm that required tenant labeling is enforced at creation for every resource type your tenants use, and test by creating records as each tenant user. Work through the labeling pattern in the multi-tenant access control topic.

Medplum auth docs

Overly broad admin accounts

Project admin and super-admin roles bypass the access policies that separate tenants, so any account holding them can read across every clinic in the project. Shared administrator logins and admin roles granted for convenience are the usual causes. Limit admin rights to a small named group, keep tenant users on scoped policies only, and confirm that no day-to-day clinical or support account holds these roles. Review the list of admins on a fixed schedule.

Binary files without securityContext

Binary resources, such as scanned referrals, lab PDFs and images, do not follow the compartment rules that protect other resource types. A file uploaded without a securityContext can be retrieved by users from other tenants who know or guess its identifier. Check every existing Binary for its securityContext, link files to a Patient or other tenant-owned resource, and confirm that new uploads from your intake and document flows set the field. The sibling topic on Binary security explains the exposure and how to audit existing files.

Bulk exports crossing tenants

Bulk data exports and broad searches return what the calling account is allowed to see, so an export job run with a permissive account or a missing filter can include records from every tenant in one file. This risk grows when exports feed a warehouse, a reporting tool or a third-party app that later spreads the data further. Scope export accounts to one tenant at a time, test each export against a known record from another tenant, and document who may run exports and where the output is stored.

Audit log review for tenant access

Policies and labels prevent most cross-tenant access, but reviewing who actually read or changed records shows where controls failed and whether they were used as intended. Audit reviews should look for reads by accounts outside a tenant, admin actions on clinical data, Binary access without a matching patient, and large exports. Ask your team to confirm which audit events the deployment records, how long they are kept, who reviews them and how often. Treat a missing or unreviewed log as a finding in its own right.

Questions MSOs ask before building tenant access in Medplum

Is one Medplum project enough for several clinics?

Often yes, if the clinics share one data model and you can label every record with the tenant it belongs to. A single project keeps configuration, bots and users in one place, but every tenant's data then sits under the same access policies. The deciding factors are how strictly the clinics must be kept apart, whether any clinic needs its own settings, secrets or users that others must never see, and whether a regulator or contract requires separate environments. If those requirements are strict, compare the isolation model in Medplum's project guidance with running separate servers. Confirm your choice with your compliance lead before you load patient data.

How much effort does a tenant model take to build?

The effort depends on how many resource types need a tenant label, how many roles your staff hold across tenants, and how many test cases you need to prove that one tenant cannot read another's records. The work usually falls into four parts: choosing the tenant resource, labeling data at write time, assigning users to tenants, and writing and testing access policies. Each part is small on its own, but the policy testing takes the most care because a missed rule exposes records. Ask any partner to break its estimate into these four parts so you can see where the time goes.

What must our team provide before an engagement starts?

Your team needs to supply a few decisions and inputs before work begins:

  • Policy owners who can approve who may see which tenant's records and sign off on role definitions.
  • A current list of tenants, including legal names, identifiers and any clinics that must stay isolated.
  • Test users for each role and tenant, plus a staging environment where access rules can be exercised safely.
  • Access to your identity provider so tenant assignments can follow your existing user groups.

Without these, the policy tests cannot prove the rules you actually need.

Can our in-house team build tenant access in Medplum?

Yes, a team with FHIR experience and access to the Medplum documentation can build it. The harder part is not writing the policy but proving it: every resource type, every role and every tenant pairing needs a test, and an omission is a data exposure. Before deciding, check whether your engineers have time for policy testing, whether someone owns the compliance evidence, and whether you will need to change the design as more clinics join. Many organizations build the first version in-house and bring in outside testing before go-live.

How long does testing tenant access policies take?

Testing duration depends on the number of roles, resource types and tenant combinations, and on how many defects appear in the first round. Plan for repeated cycles: write a test for each cross-tenant read and write attempt, run it, fix the policy, and retest. Include the Bot and integration accounts, because they often hold broader permissions than people do. No fixed duration applies to every MSO, so ask for the test matrix and the number of retest rounds in any written scope.

What drives the cost of a fixed-scope tenant access engagement?

A fixed-scope engagement is priced from its written scope, so the main cost drivers are the number of tenants and roles, the number of resource types that carry tenant labels, the number of integrations and Bots that need access rules, and whether you need a staging environment built or only reviewed. Ongoing items such as later tenant onboarding, policy changes after a Medplum upgrade, and retesting usually recur and should be quoted separately. DeployOpen does not publish a price list. Ask for a quote that lists each deliverable, the test cases covered, what you must provide, and which retests are included.

Do upgrades to Medplum break tenant access rules?

They can, so tenant rules should be part of every upgrade test. Medplum releases patch versions frequently, and each self-hosted upgrade must pass through minor versions in order, so check the upgrade guide for each step before you change production. Re-run your cross-tenant test suite after every upgrade, and confirm that access policy behavior has not changed in the release notes for the versions you cross.

Limits to confirm in your Medplum environment

A multi-tenant design in Medplum rests on a few behaviors that depend on the version, hosting option and plan you run. Confirm each one with Medplum or in a test project before you commit to the tenant model, because changing it later touches every record and policy.

Policy evaluation across multiple tenant references

Confirm how access policies evaluate a resource that carries more than one tenant reference, such as a shared clinician linked to two clinics. Ask whether criteria-based rules match on any or all references and how a policy behaves when a reference is missing. Build a small test project with one shared and one tenant-specific resource, then check what each user can read, write and search. Record the results against your chosen version.

Versions policy

Policy check performance at scale

Criteria-based policies run on every request, so their cost grows with the number of tenants, users and policies. Ask Medplum for guidance on policy count and search load for your expected volumes, and load test a realistic mix of reads and searches in a staging environment. Measure latency with the tenant count you expect in year two, not only at launch.

Handling of linked projects

If shared code systems, profiles or Bots are linked into tenant projects, confirm how linked resources appear in search results and whether tenant policies can exclude them. Ask who can create links and whether link changes need an administrator. Verify that a tenant user cannot see another tenant's data through a link, using the same test accounts as your policy tests.

Hosting option and plan support

Confirm that your hosting option and plan support the identity features your tenants need, such as multiple external identity providers, domain-level corporate sign-in or MFA. Some identity capabilities are listed as enterprise features on the pricing page, so ask for written confirmation of what your plan includes. Self-hosted deployments also need the identity provider configured and tested against each tenant's sign-in path.

Medplum pricing

Upgrade behavior with tenant policies

Access policy behavior can change between minor versions, so confirm the release notes for each step on your upgrade path. Upgrades on self-hosted Medplum must go through each minor version in sequence. Rerun the full tenant isolation test set after every upgrade stage, before users reach the new version.

Upgrade guide

How DeployOpen scopes and delivers multi-tenant Medplum access

DeployOpen plans, builds, tests and documents the tenant model, labeling, user assignment and access policies for a multi-tenant Medplum project in infrastructure you control. The work is scoped in writing before it starts, so your compliance and security reviewers see the controls and evidence they need before go-live.

How we scope

  • Agree in writing which clinics or care teams become tenants and how each one is identified.
  • Confirm the tenant resource pattern, tenant labeling rules and which resource types must carry a tenant tag.
  • Define the user roles, the admin model and the list of staff who can see each tenant's records.
  • Set the boundaries for an illustrative multi-tenant project, including any shared resources and exceptions.

How we build

  • Configure the tenant resource and the access policies that enforce tenant boundaries for each role.
  • Assign users to tenants and test that each user sees only the records for their tenants.
  • Review Binary and other resources that could bypass compartment rules and close those gaps.
  • Test policies with negative cases, such as a user from one clinic querying another clinic's patients.

How we hand over

  • Deliver the policy definitions, tenant model, user assignment procedure and test results as documentation.
  • Walk your administrators through how to add a tenant, onboard a user and retire access.
  • Provide a retest record so your team can repeat the isolation tests after each change.
  • Document the controls and evidence that your compliance team can review with an independent auditor.

How we support

  • Support is available as a retainer for policy changes, new tenants and Medplum version upgrades.
  • Retesting of tenant isolation after each release or major configuration change can be included in a retainer.
  • Ask your DeployOpen contact to confirm the support hours, response terms and retest scope in the written agreement.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.