Medplum SSO and identity integration

Medplum SSO connects your corporate identity provider, SMART-on-FHIR app launch and integration credentials to one access model. This page covers the decisions, build sequence, effort drivers and checks for a self-hosted deployment.

On this page

Why Medplum SSO needs a design before configuration

A healthcare team standing up Medplum has to settle three questions before touching any identity setting: who signs in, how workforce users, patient-facing users and server-to-server integrations differ, and who owns the access policy once the platform is live. Medplum Auth covers OAuth, OpenID Connect and SMART-on-FHIR, so the same platform handles staff logins, patient app launches and machine access, and each needs its own rules. Treating them as one login problem is the most common reason a first configuration has to be torn out later.

The identity provider choice, MFA and client credentials interact. Medplum supports its own built-in identity provider, external providers such as Google, Auth0 or AWS Cognito, domain-level corporate identity providers, client credentials for server-to-server access and multi-factor authentication. Whether a user is routed by email domain, whether MFA is enforced by the upstream provider or by Medplum, and whether a client credential bypasses interactive MFA by design are decisions that change one another. Confirm each of these behaviors against the current Medplum authentication docs in your own test project before you commit to a pattern.

The harder parts are domain-level routing, role mapping and audit evidence. Mapping a corporate group or role claim from Okta, Azure AD or another provider to Medplum access policies takes agreement between the identity team and the clinical application owners, and mistakes there are easy to miss. Multiple external identity providers for SSO are listed as an enterprise feature on the Medplum pricing page, so confirm your plan covers the providers you need before the design is locked. Auditors will also ask who approved each access rule and how it is reviewed, so decide who owns that evidence before go-live.

Which Medplum auth components and settings are involved

An SSO design for Medplum touches more than the login screen. Medplum Auth issues the tokens, the server stores the state behind them, and every client that calls the FHIR API depends on how those tokens are issued and checked. Review each part below before you fix the identity provider mapping and access policies.

Medplum Auth

Medplum Auth is the component that handles OAuth, OpenID Connect and SMART-on-FHIR flows. It issues the tokens that browsers, apps and services present to the FHIR API, so it is the first place to check when you decide whether an external identity provider or Medplum's own login authenticates users. Confirm which flows your applications need, including SMART-on-FHIR app launch, before you configure anything. Setting names are listed in the authentication docs.

Authentication docs

Medplum server runtime

The Medplum server is built on Node.js and TypeScript and uses PostgreSQL as its database and Redis as its cache. Login state, sessions and token-related data sit in this stack, so the health and network exposure of these services affect sign-in availability. Ask your platform team where PostgreSQL and Redis run, who can reach them, and how failover is handled before you rely on the server for production login.

Web app login

The Medplum web app is the interactive sign-in surface for clinicians and staff. Users reach it through the login page, which routes them to the identity provider you configure or to Medplum's own sign-in. Test the full path with a real user, including MFA prompts, password reset and sign-out, because a misconfigured redirect is often the first visible failure in an SSO rollout.

Client applications using the SDK

Custom applications built with the Medplum SDK obtain and refresh tokens through the auth flow and then call the FHIR API on the user's behalf. Each application needs its own registered client settings and redirect addresses. Review how each application stores tokens and how long sessions last, since these choices determine what a stolen browser session or device can reach.

Bots calling the FHIR API

Bots run server-side logic in Medplum and call the FHIR API without a user signing in. They authenticate with client credentials rather than an interactive login, so their access is governed by their own profile and access policy. Confirm which bots exist, what each one may read and write, and who owns their credentials, because a bot with broad access is an identity that no person reviews at sign-in.

Which identity provider pattern fits your organization

This table compares four ways to connect Medplum sign-in: Medplum as its own provider, an external provider such as Google, Auth0 or AWS Cognito, a corporate provider connected at the domain level, and client credentials for integrations. Read each row against your own user lifecycle, MFA and group mapping needs, and check the vendor tier that multiple external providers require before you commit.

PatternWhen it fitsOperational cost and ownership
Medplum as its own identity providerSmall user populations, pilots, or teams with no corporate directory to federate withYour team creates, disables and reviews every user in Medplum. You own password policy, MFA setup and access reviews directly, with no upstream source of truth.
External provider (Google, Auth0, AWS Cognito)Products or patient-facing apps where users already hold accounts with one of these servicesAccount lifecycle sits partly in the external service. Confirm which team administers it, how MFA is enforced there, and how group or role claims map to Medplum access policies.
Corporate provider at the domain level (Okta, Azure AD)Workforce access where employees should sign in with the same identity used for other enterprise systemsJoiner, mover and leaver changes flow from the corporate directory, which reduces manual Medplum user work. Group mapping must be designed and tested, and multiple external providers may require a vendor tier that includes them.
Client credentials for integrationsServer-to-server feeds, Bots, interfaces and backend jobs that need no human sign-inCredentials are issued to a service identity, so no MFA applies. Your team owns secret storage, rotation, scoping to least-privilege access policies and revocation when an integration is retired.
Multiple external providers in one tenantOrganizations with several user populations, such as staff, partners and clinicians from separate directoriesConfirm with Medplum whether your plan includes multiple external identity providers, since the pricing page lists this as an enterprise feature. Plan for duplicate-account handling and a single access policy model across providers.

How to build the SSO integration in sequence

The sequence moves from confirming hostnames and the deployment baseline to registering the identity provider, mapping groups to Medplum access, enforcing MFA, enabling SMART-on-FHIR launch, and issuing integration credentials. Each step closes with a check, so the team knows the layer works before the next one depends on it.

  1. Confirm deployment and hostnames

    Before touching the identity provider, fix the public hostnames for the Medplum API, the web app and the auth endpoints, and confirm they resolve and present valid TLS certificates in your environment. Redirect URIs registered at the provider must match these hostnames exactly, so changing them later means re-registering every application. Record the hostnames, the self-hosted version in use and the database and cache endpoints in a shared design note. Done means a browser can reach the web app and the discovery or health endpoint over HTTPS on the agreed hostnames, and the design note lists each one.

  2. Register Medplum with the identity provider

    In the chosen provider (Okta, Azure AD, Google or Auth0), create an OpenID Connect application for Medplum with the agreed redirect URIs, a confidential client type, and a client secret stored in your secrets manager. Limit the application to the users and groups that should reach Medplum. Confirm the provider's exact steps and screen names with the provider's own documentation, since these change between tenants and product tiers. Done means the provider issues a test sign-in response to the registered redirect URI, and the client ID and issuer URL are recorded in the design note.

  3. Connect the external or domain-level provider in Medplum

    In Medplum, add the external identity provider using the issuer, client ID and secret from the previous step, or configure a domain-level connection if your corporate domain should route users to the right identity provider automatically. Confirm with Medplum whether your edition includes multiple external identity providers, since the pricing page lists this as an enterprise feature. Done means a test user signs in through the provider, lands in Medplum under the expected account, and the Medplum audit log records the login.

  4. Map provider groups to roles and access policies

    Decide which provider groups correspond to which Medplum roles and access policies before go-live, such as clinicians, administrators, support staff and read-only auditors. Configure the mapping in Medplum, keep the mapping in version control, and assign group ownership to a named person in your identity team. Test each group with a dedicated test account. Done means a user from each group receives only the access defined for that group, and a user outside every group is denied at sign-in or sees no clinical data.

  5. Enforce MFA at the identity provider

    Turn on multi-factor authentication at the identity provider rather than relying on a Medplum-only setting, so the same policy applies to every application in the tenant. Define which factors are accepted, which groups must enroll, and what happens when a user has no enrolled factor. Medplum's authentication documentation describes MFA support, but confirm the exact behavior for your configuration with Medplum before relying on it. Done means a sign-in without the second factor is blocked, and a sign-in with it succeeds and is logged on both sides.

  6. Configure SMART-on-FHIR app launch

    For clinical apps that launch from inside the Medplum context, register each app as a client with its launch and redirect URIs, and define the FHIR scopes it may request, starting with the narrowest set. Medplum Auth supports SMART-on-FHIR, so confirm the launch flow against the current authentication documentation for your version. Done means a test launch opens the app with the patient or encounter context you expect, and a token inspection shows only the scopes you granted, with no broader access.

  7. Issue client credentials for server-to-server integrations

    For integrations that run without a user, such as a batch job or interface engine, create a client with the client credentials grant, bind it to a dedicated service identity with a narrow access policy, and store the secret in your secrets manager with a documented rotation owner. Keep these clients separate from human SSO applications. Done means the integration obtains a token, reads only the resource types its policy allows, and receives a denied response on a resource outside that policy, which you record as the closing test.

How the SSO setup differs by deployment model

AWS with CDK and CloudFormation is the option the self-hosting docs present as recommended, so most SSO work starts here. The deployment provisions the load balancer and certificate resources inside your AWS account, which means the public hostname and certificate binding are set during deployment and then reused by every identity provider configuration.

  • Redirect URLs: Register the exact public base URL the stack exposes with each identity provider. A hostname change after deployment means updating every redirect URI and client registration.
  • TLS termination: Confirm whether the load balancer terminates TLS and how traffic reaches the Medplum server behind it. Identity providers generally expect HTTPS redirect targets, so check your provider's requirements.
  • Certificate handling: Ask whether the stack requests the certificate through AWS Certificate Manager or accepts one you supply, and who owns renewal.
  • Secrets: Identify where client secrets and signing material are stored, such as AWS Secrets Manager or Parameter Store, and which IAM roles can read them.

Confirm the current CDK parameters, stack outputs and secret names in the self-hosting docs before you enter any redirect URI into an identity provider.

How a user login and integration token flow through Medplum

The diagram starts with a workforce user opening the Medplum web app, which redirects to Medplum Auth and then to the corporate identity provider. MFA is completed at that provider, and the provider returns the user to Medplum Auth, which issues a session and token for FHIR API calls. SMART-on-FHIR launches and server-to-server integrations using client credentials enter through the same Medplum Auth boundary. Check that PostgreSQL and Redis sit inside the Medplum deployment boundary, and confirm which token each path receives before you approve access.

User sign-in, SMART launch and client credential paths through Medplum Auth.

What drives SSO effort and how to keep it down

This table lists the factors that raise or lower the work of connecting Medplum to identity providers, and how to reduce each one. Read each row as a lever: the more of these you add, the more mapping, testing and evidence the project needs.

DriverWhy it raises effortHow to keep it down
Identity providers and domainsEach external provider or corporate domain needs its own connection, claim mapping, test logins and failure handling.Choose one primary identity provider and bring other domains in only when a business need is documented.
Roles, groups and access policiesEvery group from the identity provider may need a matching Medplum role, access policy and review step.Start with a small role model, map groups to roles in one place, and avoid per-user exceptions.
SMART-on-FHIR apps and client credentialsEach app launch and each server-to-server integration needs its own client registration, scopes and secret handling.Reuse one documented registration pattern for apps and integrations, and limit scopes to what each one reads or writes.
Environments (development, test, production)Each environment needs its own provider configuration, redirect addresses and test accounts, and drift between them causes failures.Keep configuration as code, promote the same settings through each environment, and test the production path before cutover.
MFA and conditional accessRequirements for multi-factor authentication, session length and device or network conditions add policy decisions and user-facing testing.Confirm the MFA and session rules with the security team before build, and apply them through the identity provider where possible.
Audit and compliance evidence requestsAssessors often ask for proof of who can log in, how access was approved and how changes were reviewed, which adds reports and records.Agree the evidence list early, keep access reviews and change records in a consistent format, and confirm retention with compliance.

How to test that Medplum SSO works and fails safely

The verification plan should prove three things before any clinician or integration relies on Medplum sign-in: each identity provider and domain logs users in correctly, MFA is enforced by the provider and cannot be skipped through Medplum, and access follows the roles and access policies you designed. Run a test login for every identity provider and every corporate domain you have configured, using a test account in each group that should receive a different role. For MFA, sign in with an account that has no second factor enrolled and confirm the provider blocks it, then check that Medplum does not offer a fallback login path such as a local password for the same account. Record the provider, domain, account, expected result, actual result and timestamp for each case.

Next, test the edges of access. Disable or remove a test user in the identity provider and confirm that existing Medplum sessions and new sign-in attempts both fail within the window your session settings allow; document that window rather than assuming it. Launch a SMART-on-FHIR app for a patient-context test user and confirm the returned token only reaches the resources and scopes that the launch grants, then repeat with a user who lacks that access. For client credentials, create a test client with a narrow scope, confirm it can read only the resource types it was given, and confirm a request outside that scope is refused. Finally, simulate the identity provider being unreachable and confirm that Medplum refuses sign-in rather than falling back to an unmanaged path. Keep every result as dated evidence, because the reviewers who ask about SSO later will want to see what was tested, not what was intended.

Which access controls and secrets handling need hardening

Identity configuration sits at the front of a self-hosted Medplum deployment, so weak admin accounts, exposed client secrets or open database ports undermine everything behind it. The controls below connect the identity provider, the Medplum server and the data stores, and each one needs an owner and evidence. Medplum's compliance documentation describes compliance as a shared responsibility, so the identity configuration and its records remain with your team.

Restrict administrative accounts

Limit Medplum project administrator and super admin roles to a small named group, and keep break-glass accounts separate from daily admin work. Require MFA for every privileged login, including accounts created through a domain-level identity provider. Review the admin list on a schedule and remove accounts for people who have changed roles. Ask your implementation partner or Medplum support to confirm which roles can change project-wide identity settings, since those settings control who can sign in at all.

Medplum auth docs

Protect client secrets and private keys

Client credentials for server-to-server integrations use a client secret or key pair that grants API access without a human sign-in. Store these in a secrets manager or a managed key service, never in source code, Bot configuration exported to shared folders, or chat tools. Limit which team members can view or create them. Treat a leaked secret as a breach that requires rotation and an access review.

Rotate integration credentials

Set a rotation schedule for every client credential, and record the owner, the integration it serves and the date it was last changed. Rotate in two steps where possible: issue the new credential, move the integration to it, then revoke the old one. Test that the integration still authenticates after each change. Without this record, teams often find that credentials created for a pilot still work years later.

Enforce least-privilege access policies

Access policies in Medplum determine what each user, role and client application can read and write. Start from the minimum set of resource types each integration needs, and grant clinical data access only to the roles that require it. Write test cases that confirm a restricted account cannot reach records outside its scope. Document each policy, because auditors will ask who can see what and why.

Limit redirect URIs and app registrations

Each OAuth or SMART-on-FHIR client should register only the exact redirect URIs it uses, with no wildcards and no leftover test hosts. Remove registrations for retired apps and keep production and non-production clients separate. A permissive redirect list lets an attacker send an authorization code to a host they control. Confirm the exact registration behavior with Medplum documentation for your version.

Serve the server only over TLS

The Medplum server handles sign-in traffic and access tokens, so it should be reachable only over TLS with certificates managed on a schedule. Terminate TLS at a load balancer or ingress you control and reject plain HTTP for sign-in and API paths. Confirm that redirect and callback URLs use https. Keep the hostnames used for identity providers consistent, because a mismatch often breaks sign-in and tempts teams to weaken checks.

Keep PostgreSQL and Redis internal

The PostgreSQL database and Redis cache should accept connections only from the Medplum server, typically through private subnets and security groups or network policies. Neither should have a public address, and administrative access should go through a bastion or a managed session with logging. Confirm this with a network scan from outside your environment, not only with the infrastructure template. Check that stored credentials for these services are rotated as well.

Self-hosting docs

What to monitor, document and patch after SSO goes live

Once SSO is live, the identity configuration needs a standing operating routine, not a one-time sign-off. Set up alerts and reviews for four areas: failed logins and MFA events from your identity provider, group membership changes that map to Medplum roles and access policies, client credential rotation for integrations, and a log of administrative changes to the identity provider connection, Medplum project settings and access policies. Agree the rotation schedule for client credentials with your security team and record who owns each integration credential, because Medplum does not set that interval for you. Confirm with your identity provider team which MFA and sign-in events they export, and how long those logs are retained, so your audit evidence does not depend on one side alone.

Patching is the other recurring obligation. Medplum ships patch versions weekly and major versions annually, and its versioning policy sets targets of 7 days for critical vulnerabilities (CVSS 9.0 or higher) and 14 days for high ones (CVSS 7.0 to 8.9). Self-hosted deployments have to meet those targets themselves, so name an owner, a test environment and an approval path before the first patch arrives. Upgrades must pass through each minor version in sequence, so plan for that path rather than a single jump. Read the Medplum versions and release policy and the upgrading guide before you set the calendar.

Every upgrade should trigger a re-test of the identity configuration, even when the release notes do not mention authentication. Re-check the OAuth and OpenID Connect redirect settings, the external identity provider connection, the MFA enforcement path, the domain-level sign-in rules, SMART-on-FHIR app launch and the client credentials used by integrations. Keep a short test script with expected results for each check, run it in a non-production environment first, and file the results with the change record. Where a post-deploy data migration is involved, confirm with the vendor whether authentication is available during the migration window, because that determines when your test can run.

What buyers and engineers ask before building Medplum SSO

Can our team configure Medplum SSO without an implementation partner?

Yes, a team with identity and platform skills can configure Medplum's built-in pieces without a partner, but the work is more than a settings change. Medplum supports its own identity provider, external providers such as Google, Auth0 or AWS Cognito, domain-level corporate identity providers, client credentials and multi-factor authentication, according to the Medplum authentication docs. Your team still has to decide which login path each user group takes, how roles map to Medplum access policies, how the identity provider is registered, and how the setup is tested before go-live. A partner is most useful when those design choices need an outside review or when the work must be documented for a compliance assessment.

What drives the cost and effort of Medplum SSO integration?

Cost follows the number of identity providers, the number of user groups and the depth of access policy design. Each identity provider needs its own registration, claim mapping and test cases. Domain-level sign-in, role mapping and client credentials for integrations each add a design and testing step. Self-hosting adds work for the infrastructure that hosts the login flow, while hosted plans shift part of that work to Medplum. Quote costs are one-time for design, build and testing, and recurring for updates, identity provider changes and access reviews. Ask the vendor or partner to split the quote into those parts and to state which identity providers are in scope.

What does the internal team need to provide for Medplum SSO?

The work needs three named roles from your organization: an identity administrator, a Medplum administrator and a security reviewer. The identity administrator owns the corporate provider, group membership, application registration and MFA settings. The Medplum administrator owns projects, access policies, client credentials and the mapping from groups to roles. The security reviewer checks session length, MFA enforcement, privileged roles and the audit trail before go-live. In small teams one person may hold two roles, but the reviewer should be someone who did not build the configuration. Confirm these owners and their availability before the schedule is set.

Is Okta or Azure AD integration available on every Medplum plan?

Not on every plan. Medplum's pricing page lists multiple external identity providers for SSO, including Okta, Azure and Auth0, as an enterprise feature, while paid cloud plans include BAA and MSA agreements. Check the current feature table on the Medplum pricing page before you commit to a plan, because tiers and feature placement can change. For self-hosting, confirm with Medplum which identity provider options are included in the Community option and which require Enterprise Self-Hosted. Get that confirmation in writing as part of the quote.

How do client credentials differ from user login in Medplum?

User login identifies a person who signs in through a browser and receives access that follows that person's role and access policy. Client credentials identify a system, such as an integration service or a batch job, that calls the FHIR API without a human session. Medplum supports client credentials for server-to-server access, so each integration should have its own client, its own narrow access policy and its own rotation plan. Mixing the two patterns is a common source of risk because service access can outlive the person who set it up. Review each client credential as a named account with an owner, a purpose and a revocation path.

How is MFA enforced for Medplum users?

MFA is enforced through the identity provider or the Medplum login settings, depending on where users authenticate. Medplum documents multi-factor authentication as a supported capability, but the enforcement point should be confirmed for your chosen design. When a corporate provider handles sign-in, the policy usually lives in that provider, and Medplum should only accept sessions that came through it. Your security reviewer should test that a user without a second factor cannot reach protected health data, that administrator accounts require a stronger policy, and that the policy applies to both new and existing users. Document the test results as evidence for your compliance review.

What should a written quote for Medplum SSO include?

A written quote should list each identity provider in scope, the SMART-on-FHIR app launch paths, the client credentials and integrations to be configured, and the MFA and access policy design work. It should name the deliverables, such as configuration records, a role-to-policy matrix, a test plan and a runbook, and state what the client must provide. Ask for the assumptions behind the effort, the environments covered, and what is excluded, such as ongoing identity provider changes. Also ask how upgrades to Medplum are handled, because sequential minor version upgrades can affect login configuration. The quote should give a fixed scope and timeline that both parties accept before work starts.

How DeployOpen scopes, builds and hands over Medplum SSO

DeployOpen approaches Medplum SSO and identity integration as a fixed-scope engagement inside your own infrastructure, with identity provider, access policy and MFA decisions written down before any configuration starts. The work is delivered as a documented, testable setup that your security and identity teams can review and run.

How we scope

  • Confirm which identity providers, such as Okta, Azure AD, Google or Auth0, must sign users into Medplum.
  • Record whether domain-level corporate identity or Medplum-managed accounts apply to each user group.
  • Define which SMART-on-FHIR apps and client credential integrations need access, and who owns each.

How we build

  • Configure OAuth and OpenID Connect connections to each approved identity provider in a non-production environment first.
  • Set MFA requirements and access policies that map to the roles your compliance team has approved.
  • Test sign-in, token expiry, SMART app launch and server-to-server client credentials before promotion.

How we hand over

  • Deliver a written configuration record covering identity provider settings, access policies and MFA rules.
  • Document test results, known limitations and the steps to add a new identity provider or application.
  • Walk your identity and platform engineers through the setup so they can operate it without us.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and continuous testing are available as a retainer that covers identity changes.
  • Ask any quote to state which identity changes, re-tests and Medplum upgrade effects are included.

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.