Law Firm AI Agents: Shared Logins vs OAuth vs API Keys
Why agent identity stopped being a theoretical problem
For two years the question in small firms was “can AI do this task?” The 2026 question is “who exactly was logged in when it did?”
There is a steady stream of trade reporting about banks and government portals detecting — and in some cases blocking — logins driven by personal AI agents. We’re not going to hang an argument on a specific article or a number we can’t stand behind; if you want to cite one, verify it yourself before you repeat it. The underlying mechanic, though, is uncontroversial and worth internalizing: fraud and abuse systems score sessions on behavioral signals like typing cadence, navigation speed and device fingerprint. An agent driving a browser with a human’s credentials produces a session that doesn’t look human, because it isn’t. Whether a given institution treats that as fraud, as a terms-of-use violation, or as nothing at all is their call, not yours.
Translate that to a seven-lawyer firm: the bank holding your IOLTA account, the county recorder, your e-filing provider and your malpractice carrier all have an interest in knowing whether a human or a script is on the other end of the session. Your answer should not be “we gave the bot Jennifer’s password.”
These are editorial rules of thumb — judgment calls, not measured findings:
The three ways an agent can get in
Shared human credentials. The agent (usually a browser-driving agent or RPA script) logs in as a person: same username, same password, sometimes the same MFA code read aloud by a paralegal. Everything it does is attributed to that person. This is the only option for systems with no API — which still includes a lot of court e-filing portals, insurer portals and county systems.
Delegated OAuth. The agent is registered as an application. A human clicks “authorize,” and the agent receives a scoped, expiring token. Access can be revoked without changing anyone’s password. Clio’s developer documentation describes an OAuth 2.0 flow for API applications, and Microsoft 365, Google Workspace, NetDocuments and DocuSign follow the same general pattern. The Model Context Protocol’s authorization guidance for remote servers also builds on OAuth — re-check the current spec, since this area has been moving fast as of 2026.
Be realistic about what OAuth buys you. Many legal and productivity APIs publish coarse scopes — “read all matters” with no per-matter restriction, “full mailbox” rather than one folder — and plenty of audit logs record which application acted, not which specific record it touched or why. Delegated OAuth is a meaningful improvement over password-sharing. It is not the fine-grained, self-documenting permission system the marketing pages imply. Read the vendor’s actual scope list before you design around it.
Dedicated service account or API key. The agent is its own user: “Intake Agent,” “Reconciliation Agent.” It holds its own key, has its own permission set, and shows up in logs under its own name. This is what you typically use when you’ve built your own integration layer — for example a custom MCP server over your firm’s matter data. The tradeoff: there’s no human consent gate at runtime, so over-permissioning a service account is one of the easier ways to give an agent far more reach than you intended.
If your audit log can’t tell the difference between you and your agent, you don’t have an audit log. You have an attribution problem waiting for a bar complaint.
Where the key actually lives
“Give the agent its own key” is only safer than password-sharing if the key doesn’t then end up somewhere worse. The common failures are mundane: an API key pasted into a chat prompt or a system-prompt file, a token committed to a repo, credentials sitting in a plaintext .env on a laptop that isn’t encrypted, or a service account password stored in a shared spreadsheet because the firm’s password manager “is for people.”
The workable pattern for a small firm: secrets live in your password manager’s shared vault or your hosting platform’s secrets store, get injected as environment variables at runtime, and are never typed into a prompt window — because prompts get logged, and those logs may sit with a third party. Give each secret a named owner, note its expiry date, and treat a key pasted into a chat as compromised and rotate it. Supervising delegated work extends to supervising where the delegated credential sits; see the ABA Model Rules on supervision and Rule 1.6(c)‘s reasonable-efforts standard for safeguarding client information, plus whatever your state bar has published on top of it.
Matching the model to the systems a small firm actually runs
Walk your stack and label each system with the best mechanism available, not the most convenient one:
- Practice management and DMS (Clio, MyCase, Smokeball, NetDocuments, iManage): delegated OAuth. These vendors publish APIs; use them rather than screen-scraping. If you’re wiring an assistant into your matter files, connecting Claude to Clio through MCP is an OAuth-shaped problem, not a password-sharing one.
- Email and calendar: OAuth with the narrowest scope the vendor offers — and if the narrowest available scope is still “everything,” know that going in.
- Banking and trust accounts: the highest-risk square on the board. Many firms use a read-only feed or exported statements rather than letting anything log in interactively. Automated access to an IOLTA account touches both your bank’s terms and your state’s trust accounting rules — confirm both with your bank and a qualified professional familiar with your jurisdiction before automating anything there.
- Court e-filing and government portals: usually no API for small firms, which is exactly why browser agents, MCP and RPA get compared for portal work. If the only path is a human login, keep a human in the loop at submission and check the portal’s terms of use.
- Your own files, spreadsheets and internal databases: service account on a firm-built connector, least privilege, read-only first.
A worked example: the monthly reconciliation agent
Say you want an agent that each month pulls the bank statement, matches transactions against ledger entries in your practice management system, and drafts an exceptions list for the bookkeeper.
The tempting build is a browser agent with the firm’s online banking login. The safer build: a read-only feed or exported statement into a folder the agent can read, plus an OAuth-scoped connection to the practice management system’s financial records, plus a human who reviews and posts every adjustment. The agent prepares; the human decides. That also keeps you aligned with the supervision expectations in ABA Formal Opinion 512 (2024) on generative AI and the ABA Model Rules on supervising nonlawyer assistance — and your state bar may have its own guidance, so check it.
To size the value, don’t take anyone’s headline number. Use your own: (hours the bookkeeper and a partner spend on reconciliation each month) × (your blended cost per hour) × 12, plus whatever share of that partner time realistically becomes billable instead of absorbed elsewhere. Then subtract build and maintenance cost, including the hours someone spends each quarter rotating keys and fixing broken connections. If the result isn’t comfortably positive on paper, the automation isn’t ready.
When the token breaks halfway through
Revocation gets all the attention; silent breakage causes more trouble. Refresh tokens expire, vendors deprecate scopes, an admin tightens a permission, a service account loses a seat at renewal. The agent then fails partway — the reconciliation reads the bank data, writes four ledger notes, hits a 401 on the fifth, and stops. Nobody notices, because success was the only outcome anyone built a notification for.
Design for it: have every agent run report completion explicitly (including “completed with errors”), and alert a named human on silence, not just on failure. Make write steps idempotent or checkpointed so a rerun doesn’t double-post. Log the last four characters of the credential used and its expiry so a human can diagnose in seconds. And decide in advance whether a half-finished run should roll back or hold for review — for anything touching client funds or filings, hold for review.
Getting the plumbing right
-
Inventory what the agent will touch
List every system, and for each one note: does it have an API? Does it support OAuth? Can we create a named service account? What do its scopes actually cover, and what does its audit log genuinely record? -
Give every agent its own identity
No agent shares a human’s account. Name it, document its owner, and make sure the name appears in logs. -
Store the secret properly
Shared vault or platform secrets store, injected at runtime, never pasted into a prompt. One named owner per credential. -
Start read-only, then widen
Run the agent in read-and-draft mode until the output is boring. Write access is a separate decision — see our breakdown of read-only vs write access for law firm agents. -
Set rotation, monitoring and offboarding rules
Rotate on a schedule you pick, alert on expiry before it bites, and make revoking a departing contractor’s agent access a one-click job. -
Put it in the vendor contract
Ask prospective legal-AI vendors, in writing: how does your agent authenticate, what scopes does it request, what per-action logs can we export, and how fast do you notify us of an incident? Keep the answers.
When “no agent access” is the right answer
Sometimes the honest call is that the agent shouldn’t be connected at all. If a workflow runs twice a month, touches a portal that forbids automation, and takes twenty minutes, a human doing it with an AI-drafted checklist is cheaper and safer than any integration. Off-the-shelf features inside your existing practice management system also solve the identity problem for you — their agent runs inside their permission model, which is a genuine advantage over a bespoke build you now have to govern.
The decision that matters isn’t which AI you buy. It’s whether, six months from now, you can answer a client, a bank, or a disciplinary authority asking: who did this, and under whose authority? Build so that question has a one-sentence answer.
Where is your firm losing billable hours?
Get a free automation audit: we map your intake-to-invoice workflow and show you exactly what's worth automating — before you spend a dollar.
Get a free automation audit