AI Agent EHR Logins: Shared vs Service Account vs OAuth

By Jude Lee · · Custom

Practice manager and IT consultant reviewing EHR user accounts on a front-office computer in a small clinic

The agentic sales pitch has gotten very good. The plumbing question underneath it has not gotten easier. Vendor funding rounds and product launches in the agentic-healthcare space keep pointing the same direction — control planes for “AI workforces,” agents for intake and revenue cycle — and the trade press has increasingly framed the real bottleneck as governance and interoperability rather than model accuracy. Treat any specific figures you see in those announcements as the vendor’s own claim and check the original release before repeating them.

Translated into office-manager language: the agent works fine in the demo. The problem starts when it needs a way into your practice management system, and someone says “just use Sarah’s login for now.”

Why the login decision quietly decides your audit trail

The HIPAA Security Rule, published by HHS, lists unique user identification as a required implementation specification — assign a unique name or number for identifying and tracking user identity (45 CFR §164.312(a)(2)(i)) — alongside audit controls that record and examine activity in systems containing ePHI (§164.312(b)). The Privacy Rule’s minimum necessary standard applies to what that identity is allowed to see. HHS has also proposed updates to the Security Rule through the Federal Register; confirm the current status and the exact obligations against HHS/OCR guidance directly, because this area is moving.

None of those rules mention AI agents, because they predate them. But the logic transfers cleanly: if an automated process reads hundreds of charts a week, your access logs should say so, under a name that is not a person’s.

If your audit log can’t tell you whether a human or an agent canceled that appointment, you don’t have an audit log — you have a rumor.
Required
HIPAA Security Rule status of unique user identification
45 CFR §164.312(a)(2)(i)
1:1
agents to named identities — our working rule of thumb, not a regulation

Option one: the borrowed staff login

A vendor or contractor asks for credentials to an existing user — often the billing lead or a front-desk account, because those have the broadest permissions. Nothing to configure, works today.

It also means every agent action is attributed to a human who didn’t take it. When a patient disputes a canceled appointment, when a payer audits who touched a claim, or when you investigate a potential impermissible disclosure, the log points at Sarah. You cannot revoke the agent without locking out a person. You cannot scope the agent’s access without shrinking hers. And most EHR terms of use prohibit credential sharing outright — check yours.

There is one narrow case for it: a time-boxed, read-only pilot on test or de-identified data, with the credential rotated the day the pilot ends. That’s it.

Option two: a dedicated service account

You create a named non-human user — agent.eligibility, not tempuser2 — with its own credentials, its own permission set, and its own entry in your access review. In our opinion this is the realistic default for many independent practices as of 2026: not because it’s ideal, but because scoped app registration isn’t something every practice management vendor exposes to its own customers. Verify what yours actually supports before assuming either way.

What it buys you: clean attribution in the audit log, permissions scoped to the one job (an eligibility agent needs the schedule and insurance tabs, not the clinical note), and a single switch to turn the agent off at 4 p.m. on a Friday without paging anyone.

What it costs you: a seat license, in many systems — some vendors charge full per-user pricing for a service account, which is worth negotiating before you sign. The subtler cost is that a non-human account usually can’t satisfy MFA or SSO the way a staff account does; there’s nobody to approve the push notification. Compensate deliberately: restrict the account to known source IPs, keep the secret in a password vault rather than a config file on a consultant’s laptop, set a rotation schedule with an owner’s name on it, and document the SSO policy exclusion in writing with whoever runs your IT so it isn’t discovered during an audit.

Option three: delegated, scoped access

The better pattern, where your systems support it: the agent never holds a password at all. It holds a short-lived token, issued on behalf of a specific person or a specific registered application, limited to specific scopes. In health IT this shows up as OAuth 2.0 and SMART on FHIR app authorization, documented by HL7 and reflected in certified EHR APIs under the ONC/ASTP certification program.

Why it matters operationally: scopes are the technical expression of minimum necessary. A token good for reading appointments and coverage resources cannot read psychotherapy notes, no matter how the agent is prompted. Tokens expire. Consent and delegation are recorded. And when a staff member leaves, revoking their delegation revokes the agent acting on their behalf.

This is also where MCP — the Model Context Protocol, an open standard for giving an AI assistant governed access to tools and data — fits. MCP is a connection layer, not an authorization system: it describes which tools an assistant can call, and it can pass through the identity and token your systems already issue. Done well, a custom MCP server over your practice data becomes your policy chokepoint — every tool it exposes is a deliberately narrow verb (get_coverage_for_appointment, not run_sql), every call is logged with the agent’s identity, and PHI never leaves systems covered by a BAA. If you’re deciding between integration routes, we compared them in FHIR vs HL7 vs MCP.

Service account
Works in legacy PM systems with no modern API. Fast to set up. Attribution is clean. But permissions are as coarse as your EHR’s role editor, credentials are long-lived, MFA doesn’t really apply, and secret rotation is a manual chore you will forget. Defensible for a single read-only job.
Delegated OAuth / MCP passthrough
Scopes enforce minimum necessary at the protocol level, tokens expire, revocation is instant. Requires a system that supports it and someone to build or configure the server. Our threshold: once you’re running a second or third agent, once any of them writes back to the chart, or once the scope spans clinical data rather than schedule and coverage, the token route stops being overkill and the service account starts being the risk.

A worked example: the eligibility agent

  1. Write the agent's job description first

    One job: for tomorrow’s schedule, confirm active coverage and flag mismatches. Nothing else. The job description determines the permission set — not the other way around.
  2. Pick the identity

    If your PM system supports app registration and scoped tokens, use it. If it doesn’t, create a named service account with read access to schedule, demographics, and insurance only — and get the write-access question settled deliberately using the read-only vs approval vs full-auto framework.
  3. Package the behavior as a skill

    A skill is a reusable, packaged instruction set that makes the agent do the job the same way every time: which payers to check, how to classify a “termed” result, what the flag note must say, when to stop and ask a human. Same job, same output, every morning.
  4. Route exceptions to a named human

    Terminated coverage, Medicaid secondary, anything ambiguous: the agent produces a worklist, a person resolves it. Keep the human in the loop where money or clinical access is at stake.
  5. Review the logs weekly for the first month

    Pull the agent’s access log. Does volume match the schedule? Any access outside its scope? This is cheap now and expensive later — see our take on oversight approaches.

What getting this right is actually worth

Don’t take a vendor’s ROI slide at face value, and don’t take ours either — model it yourself. The formula has two halves: (hours recovered per week × your loaded hourly rate) for labor, plus (denials avoided per month × your average allowed amount × the share you’d otherwise write off) for revenue.

Here’s the shape of it with placeholder numbers — these are illustrative assumptions, not measurements, and yours will differ. Say you assume 6 hours a week of front-desk verification time recovered, at a $28 loaded hourly rate: 6 × 28 × 4.33 weeks ≈ $730 a month. Say you also assume 9 eligibility-driven denials avoided per month, at a $140 average allowed amount, of which you’d historically write off about 40%: 9 × 140 × 0.4 ≈ $500 a month. Those two lines are your ceiling, before subscription and build cost. Swap in your real staffing rate, your real denial mix, and your real write-off rate; if the total doesn’t clear the ongoing cost with room to spare, the honest answer is to wait.

The identity work itself adds hours up front and roughly zero ongoing cost. The downside of skipping it only shows up during an audit, a breach investigation, or a staff departure — which is exactly why it gets skipped.

The jobs that stay human

The practice jobs that survive agentic automation are the ones that hold credentials and accountability. An agent can run the eligibility list overnight; a person signs off on the exceptions, owns the payer relationship, decides when a patient gets a courtesy write-off, and answers for what happened when a payer asks. That accountability can’t be delegated to a token.

Which is the whole argument for doing the identity work before the pilot rather than after. Identity isn’t a technical footnote — it’s the line between automation you can defend in an audit and automation you can only apologize for.

Not sure where to start?

Get a free automation audit: we map your scheduling, intake, insurance, billing, and patient communication and show you what's worth automating — before you spend a dollar.

Get a free automation audit