Setting up Okta as a Medplum domain-level identity provider

Forcing every staff member on your email domain through Okta before they reach Medplum, with the Okta OIDC app, the Medplum callback URL, super admin recovery and test account handling.

On this page

How to set up Okta as the domain-level identity provider for Medplum

If you want every staff member on your company email domain to sign in to Medplum through Okta, this section covers the three pieces that make that work: the Okta OIDC web app, the Medplum callback URL and the domain-level identity provider configuration on a self-hosted server. Medplum supports domain-level corporate identity providers, which means the provider is tied to an email domain rather than to one application. A per-client provider is attached to a single ClientApplication, so each app decides which sign-in source it trusts. A domain-level provider instead applies to anyone whose address matches the domain, which is the mechanism you need when the goal is one sign-in path for the whole workforce. Confirm the exact domain-matching behavior in the Medplum authentication documentation before you rely on it, including what happens to an address that matches no configured domain.

Before you touch Okta, decide who owns each side of the setup. Your identity team usually controls the Okta organization, the application assignments and group rules, while your platform team controls the Medplum server configuration and the redirect URI it expects. Write down the exact callback URL the Medplum server will use, because Okta rejects sign-ins whose redirect URI does not match the registered value character for character, including scheme, host, port and path. Also confirm with your platform team which Medplum version you run, since the Medplum authentication docs and the server configuration keys can change between releases. The paid cloud plans list multiple external identity providers for SSO as an enterprise feature on the Medplum pricing page, so if you are on a hosted plan, confirm with Medplum that a domain-level Okta provider is included in your contract before you plan the rollout.

Plan the rollout around the people who will be affected first. A domain-level provider changes sign-in for every matching account, so existing Medplum users who signed in with a local password need a clear cutover date and a way to reach their own account if Okta is unavailable. Decide ahead of time who holds super admin access on the self-hosted server, because that role can change project settings and identity configuration, and keep at least one break-glass path documented outside Okta. Test with a small group of accounts first, and deliberately include edge cases such as shared test accounts, service identities and contractors whose email domain differs from the corporate domain. Each of these can fall outside the domain rule, and you should decide whether to route them through a different provider or retire them before go-live.

Staff sign-in flow through Okta to Medplum

The flow starts when a staff member opens the Medplum web app and enters an email address on the domain configured for Okta. Medplum Auth hands the browser to the client's Okta tenant, where the user signs in and passes whatever policies Okta enforces. Okta returns the user to the Medplum callback URL with an authorization code, and Medplum Auth exchanges it for tokens and matches the identity to a Medplum profile. Check that the callback URL matches the Okta app exactly and that the trust boundary sits where your security team expects it.

Domain-level sign-in path from the staff browser through Okta and back to Medplum Auth.

Which Okta and Medplum configuration fits your environment

Use a domain-level identity provider when every staff member who signs in with your corporate email domain should authenticate through Okta, regardless of which Medplum project or application they open. This is the option that enforces one sign-in path for the whole workforce, so it fits organizations where Okta is the system of record for joiners, movers and leavers.

  • Okta requirement: an OIDC web application with the callback URL that Medplum gives you, and assignments that cover every staff group that needs access.
  • Medplum requirement: a domain-level identity provider configured against your email domain, with a super admin who can manage the settings on a self-hosted server.
  • Access control trade-off: Okta decides who can start a session, but Medplum project memberships and access policies still decide what each user can see and change.
  • Edge cases: shared or test accounts on the same domain are pulled into the same flow, so plan a separate path for them before cutover.

Confirm with your Medplum administrator whether your plan includes domain-level providers before you design the rollout.

Configure the Okta OIDC web app and Medplum callback URL

This sequence creates an OIDC web application in Okta, points it at the exact Medplum callback URL for your self-hosted domain, and connects it to Medplum as a domain-level identity provider so staff on your email domain sign in through Okta.

  1. Confirm the public Medplum domain and callback address

    Before touching Okta, the platform owner records the exact public address of the self-hosted Medplum server, including scheme, host and any port, and the callback path that Medplum expects for its authentication flow. Get this from the Medplum authentication docs and your own deployment, not from memory. The check is a written value that matches the address users actually open in a browser. Any mismatch here will cause every later redirect to fail, so treat this value as the source for the steps that follow.

  2. Create the OIDC web application in Okta

    An Okta administrator creates a new application in the Okta admin console using the OIDC sign-in method and the web application type, which is the type for a server-side app that holds a client secret. Name it clearly so auditors can identify it later. Keep the app in the Okta org that holds your staff directory. The check is that the application appears in the Okta applications list with the OIDC web type selected, and that you can open its General settings.

  3. Set the sign-in redirect URI exactly

    In the new Okta application, add the Medplum callback URL from the first step as a sign-in redirect URI, character for character. Trailing slashes, http versus https, host case and port numbers all count as mismatches. Remove any default or placeholder redirect URIs that Okta adds. The check is a side-by-side comparison of the Okta value and the value in the Medplum documentation, and a test that Okta rejects a login attempt when the URI is altered by one character in a non-production copy.

  4. Assign users or groups to the application

    Assign the Okta groups that should reach Medplum, such as a workforce group that covers staff on your email domain. Do not use Everyone unless that matches your policy. Users who are not assigned will be stopped by Okta before Medplum sees them. Confirm the assignment with a test user from each group you expect to include, and a test user outside every assigned group who should be blocked. The check is that the blocked user receives an Okta access denial rather than reaching Medplum.

  5. Record the client ID and client secret securely

    Copy the client ID and client secret from the Okta application's client credentials section into your organization's secrets manager, not into a shared document or chat. Limit read access to the people who maintain the Medplum server configuration. Note the Okta org URL that issued the credentials, since Medplum's identity provider settings will reference it. The check is that the secret is stored in one approved location, that the access list is recorded, and that you know how to rotate it in Okta if it is exposed.

  6. Add the domain-level identity provider to Medplum

    On the self-hosted Medplum server, the administrator adds Okta as a domain-level identity provider using the settings named in the Medplum authentication docs, supplying the Okta issuer, client ID, client secret and the email domain that should be routed to Okta. Confirm the exact configuration keys in the docs for your Medplum version before editing any file, because they can change between releases. Restart or redeploy according to your deployment method. The check is that the server starts cleanly and that the configured domain appears in the login flow for an address on that domain.

  7. Verify a test login and a rejected email

    Using a test account on the configured domain, sign in to Medplum and confirm the browser is redirected to Okta, authenticates there, and returns to Medplum with an active session. Then attempt sign-in with an address on a different domain and confirm Medplum does not route it through Okta for that domain. Also test a domain user who is not assigned in Okta. Record the results with timestamps and the Medplum version tested. The check is that the successful, rejected and unassigned cases each behave as designed before any production staff are moved to this flow.

Keeping a super admin path when the identity provider is down

Before you force domain sign-in, make sure someone can still administer Medplum when Okta is unavailable, misconfigured or unreachable. Forcing all staff on your email domain through Okta means that password and other non-Okta logins for those users stop working, so a broken callback URL, an expired client secret or a policy change in Okta can lock out every administrator at once. Plan a break-glass super admin account that does not depend on Okta, and treat it as a separate, documented recovery path rather than an afterthought.

Create that account before the domain rule goes live, and confirm the super admin procedure against the self-hosting docs for the Medplum version you run, since the steps for creating and authorizing a super admin depend on the release. Store its credentials in a sealed vault controlled by people outside the day-to-day Okta administration group, and require two people to retrieve them. Record who can reach the Medplum server, its host and the PostgreSQL database, including cloud console, SSH and database roles, because a super admin login is useless if nobody can get to the infrastructure to reset it. Keep this list current as staff change roles.

Test recovery in a non-production environment before go-live: block the Okta application for a test user, confirm the break-glass account still signs in, and check that the admin can reach the project settings needed to change the identity provider configuration. Repeat the test after each Medplum upgrade, since a server upgrade can change how sign-in and provider settings behave. Set a review date for the credential rotation and the access list, and log every use of the break-glass account so that an unexpected sign-in is visible to your security team.

Edge cases that break domain-level sign-in

Forcing an email domain through Okta changes who can sign in, how, and with which credentials. The cards below cover the accounts and flows that sit outside the normal staff login path, each with the check to run before you switch the domain on.

Test accounts on the forced domain

Any test or sandbox user whose address sits on the forced domain will be redirected to Okta, even if it was created as a local Medplum login. Test users without a mailbox in your Okta tenant will fail at sign-in. Before rollout, list every account on the domain that is not a real staff member, decide whether it moves to a separate test domain or receives an Okta account, and confirm that a sign-in attempt from each one behaves as you expect.

Service accounts and client credentials

Client credentials used for server-to-server access never open an interactive login, so a domain rule has no effect on them. Their risk is different: they keep working after a staff member is removed from Okta. Inventory every ClientApplication in the project, confirm which ones depend on a user identity, and confirm that the owner of each credential is recorded and that the credential is rotated when that owner leaves.

Users with addresses outside the domain

Staff who hold a Medplum login under an address that is not on the forced domain, such as a personal address or a partner's domain, will keep signing in with their local credentials and bypass Okta. Export the user list, compare each address to the domain, and decide per user whether to change the address, add an Okta account, or remove the login. Confirm the result by signing in as one of these users after the change.

Contractors and patients

Contractors may hold domain addresses but no Okta assignment, and patients normally never belong to a corporate domain at all. A forced domain can lock out a contractor who needs access, or shut out a patient whose address happens to match. Confirm which accounts your Okta app should assign, and confirm that patient sign-in uses the flow you intend, separate from staff access.

Password MFA applies only to password logins

Multi-factor authentication configured in Medplum applies to password-based sign-in. Staff who reach Medplum through Okta receive whatever factors Okta enforces, so Medplum's MFA settings will not add a second prompt on top of Okta. Before rollout, confirm in Okta that the app requires the factors your policy needs, and confirm that any remaining password logins are covered by Medplum MFA as a separate control.

Medplum auth docs

Questions teams ask before setting up Okta for Medplum

How much effort does the Okta and Medplum configuration take?

For a single domain and a small set of staff, the work is mostly configuration: one OIDC web app in Okta, one identity provider definition in Medplum, and a sign-in test for each user group. The effort rises with the number of Okta groups you map, the number of Medplum projects and ClientApplications that must stay on Medplum's own login, how you handle users who already have Medplum accounts, and how many environments (development, staging, production) need matching settings. Edge cases such as test accounts, contractors on other domains and break-glass administrators add more design time than the core setup. Ask any partner to list each environment and each account type in the written scope so the effort is visible before work starts.

Can an internal team set up Okta for Medplum without outside help?

Yes, if your team already runs Okta and has administered a self-hosted Medplum server, the core steps are within reach: create the OIDC app, set the exact Medplum callback URL, register the domain-level provider, and test sign-in. The risk sits in the parts that are easy to get wrong, such as matching users by email, deciding what happens to accounts created before the change, and making sure a super admin can still reach the server if Okta is unavailable. A team new to either platform usually benefits from an outside review of the design before cutover. DeployOpen can plan, implement and document this work in your infrastructure on a fixed scope, and it can also review an internal build.

What access do Okta and Medplum administrators need for the work?

The Okta side needs an administrator who can create and edit application integrations, manage groups and assignments, and review sign-on policies for the app. The Medplum side needs someone who can manage the project and identity provider settings, and on a self-hosted server, a super admin who controls the server configuration and can recover access. Keep these roles separate from everyday users, and record who holds each one. Ask for a named approver on each side, because a change to the callback URL or the domain mapping affects every employee who signs in. Confirm the exact Okta role names and Medplum permissions against the current Medplum authentication documentation in your own environment before granting access.

How long do testing and rollout usually take?

The duration depends mostly on user count, the number of groups and domains involved, and how many edge cases must be proven before cutover. A pilot with a small group of staff who represent each role is the most useful first step, followed by a check of accounts that already exist in Medplum to confirm they match on email and do not create duplicates. Plan extra time for a staged rollout to production, a documented rollback path, and a sign-in test for a super admin account. No duration is fixed here because none has been established for your environment; ask any partner or internal lead to base the schedule on your user list, your change window and the test cases agreed in writing.

What changes if the Medplum server is upgraded later?

The Okta app and the domain-level provider settings should survive a server upgrade, but each upgrade needs a sign-in test because authentication behavior and configuration can change between releases. Self-hosted Medplum must be upgraded through each minor version in sequence, and skipping versions can cause startup failures, so the identity settings should be re-checked at every step. Keep the callback URL, the domain mapping and the super admin recovery path in your upgrade runbook. Review the Medplum upgrading guide and release notes for each target version, and treat any change to the identity provider as part of the upgrade test plan rather than an afterthought.

What drives the cost of this work, and what should a quote include?

Cost has three parts: the design and configuration work, the testing and rollout, and the ongoing operation of the identity setup. The design cost rises with the number of environments, groups, edge-case accounts and integrations that must keep working. Testing rises with the number of user types and the amount of rollback planning you require. Ongoing cost is mainly the time your team spends reviewing sign-in issues, updating settings after upgrades and rotating credentials. Medplum's own subscription price is separate: its pricing page lists hosted plans, and it notes that multiple external identity providers such as Okta are an enterprise feature on paid cloud plans, so confirm which plan includes what before you assume the setup is available. A quote should list each deliverable, the environments covered, the test cases, the handover documents and any retest included.

Does the Okta setup change how Medplum handles MFA and sessions?

When a user signs in through Okta, Medplum relies on the MFA policy enforced by Okta rather than its own MFA prompts for that login, so Okta's authenticator rules decide the second factor. Session length and logout behavior depend on both Okta sign-on policies and Medplum's token lifetimes, and the two can differ. Review both sets of settings together, test a full sign-out and a return visit, and confirm which settings apply to super admin accounts. Medplum's authentication documentation describes the supported MFA methods and the token options, so use it as the reference when you write your test cases.

How DeployOpen scopes Okta sign-in for Medplum

Every Okta and Medplum domain sign-in engagement starts with a written scope that names the Okta org and authorization server, the Medplum projects and environments in scope, the email domains that will be forced through Okta, and who on your side approves each change. DeployOpen agrees deliverables and timelines in writing before any configuration begins, so the work is bounded in advance. The configuration itself runs inside your infrastructure: your cloud accounts, your self-hosted Medplum server, and your Okta tenant, with your administrators holding the final privileged access.

The written scope also settles the procedures that are easiest to get wrong. It should specify who holds the super admin role on the self-hosted server, how that account is created and recorded, and how it is kept out of day-to-day use. It should list the test accounts that will exercise the sign-in path, including any accounts that sit outside your email domain, and state how each one is provisioned, reviewed and removed. Confirm these owners and the removal steps with your team before the build starts, not after the first login failure.

Evidence is delivered as part of the work rather than reconstructed later. Expect documented configuration of the Okta app and Medplum settings, the callback and sign-in test results, the super admin and test account register, and a record of the change approvals. These artifacts help your compliance and security teams answer questions in an assessment, but they do not replace an assessment by an independent auditor. Retainers for upgrades and recurring testing are optional and priced separately from the initial scope, so ask for them as separate line items in the quote.

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.