---
title: Should multiple AI agents share one service account?
url: https://opencontroller.lyzr.com/blog/should-ai-agents-share-a-service-account
published: 2026-11-15
updated: 2026-11-15
author: Lyzr
---

# Should multiple AI agents share one service account?

**No. When several AI agents run under one service account, you cannot tell from logs which agent did what, you cannot revoke one agent without stopping all of them, and the account accumulates the union of every agent's permissions. Give each agent its own identity, scoped to its own job.**

Shared accounts are common because they are quick. A team creates `svc-ai-prod`, grants it broad access, and every new agent reuses it. The [OWASP Non-Human Identities Top 10](https://owasp.org/www-project-non-human-identities-top-10/) names this pattern directly as NHI Reuse, alongside Overprivileged NHI and Long-Lived Secrets.

## What actually goes wrong with a shared service account?

| Harm | What it looks like in practice |
|---|---|
| Blast radius | A prompt-injected summarisation agent can use the CRM write permission that only the sales agent needed |
| Lost attribution | The audit log says `svc-ai-prod` deleted 400 records; nobody can say which of six agents did it |
| No targeted revocation | To stop one misbehaving agent you must rotate the shared secret and break the other five |
| Permission creep | Each new agent adds scopes; none are removed when agents retire |
| Weak access reviews | Reviewers see one account with broad rights and no single owner to ask |
| Secret sprawl | The same credential is copied into many deployments, so rotation is risky and often skipped |

Attribution is the one that usually hurts first. Incident response, cost allocation and behavioural monitoring all assume you can tie an action to one agent.

## Is it ever acceptable to share?

There are narrow cases:

- **Replicas of the same agent.** Ten instances of one agent version can share one identity, because they are the same principal.
- **Short-lived prototypes** in an isolated sandbox with no production data, if they are deleted on a fixed date.

Different agents, different owners or different purposes should not share. If two agents need the same permissions today, they will not next quarter.

## How do you migrate to one identity per agent?

A step-by-step path that avoids an outage:

1. **Inventory who uses the account.** Pull sign-in and API logs for the shared identity over 30 days. Map source IPs, workloads, user agents or client IDs to specific agents.
2. **Record each agent's actual permissions.** From the same logs, list the APIs and resources each agent really calls. This is the starting scope for its new identity, usually far smaller than the shared account's.
3. **Create one identity per agent.** Prefer workload identity federation or managed identities over new static keys. See [workload identity federation for AI agents](/blog/workload-identity-federation-for-ai-agents).
4. **Assign an owner.** Every new identity gets a named human owner in your identity provider and an entry in the agent registry.
5. **Cut over one agent at a time.** Switch the agent to its new identity, watch for permission errors for a few days, then remove its traffic from the shared account.
6. **Shrink the shared account as you go.** Remove scopes that no remaining agent uses.
7. **Disable, then delete.** When logs show no traffic for a full business cycle (often 30 days), disable the shared account. Delete it after a further holding period.
8. **Prevent recurrence.** Add a policy check that flags any new agent registered with an identity already bound to another agent.

## What about agents acting for users?

One identity per agent covers *what the agent is*. When an agent acts for a person, it also needs *who it acts for*. Delegated, on-behalf-of tokens carry both, so logs show "agent X acting for user Y". That is better than either a shared service account or the user's own credentials. See the pillar on [agent identity and on-behalf-of delegation](/blog/ai-agent-identity-on-behalf-of-delegation).

## How Opencontroller does this

Opencontroller's auto-discovery finds agents, models and API keys across AWS, Azure and Google Cloud, which helps with step 1. Posture detects risky permission and configuration choices, such as broad shared credentials. The governed registry records each agent, version and owner. Agent workload identity federation and delegated on-behalf-of identity support step 3 and the user-delegation case. Per-agent Block and Quarantine controls let you stop one agent without touching the others. [Book a demo](https://www.lyzr.ai/book-demo/) to see it on your estate.

## Frequently asked questions

**Can different replicas of the same agent share an identity?**
Yes. Replicas of one agent version are the same principal. Different agents, owners or purposes should each have their own identity.

**How long should we watch logs before disabling a shared account?**
Long enough to cover a full business cycle, often 30 days, so monthly jobs are not missed. Disable first and delete later.

**Does one identity per agent create too many accounts to manage?**
It creates more identities, but each has a clear owner and scope. Workload identity federation avoids the static secrets that make large numbers of identities hard to manage.

## Key facts

- Multiple AI agents should not share one service account; each agent should have its own identity scoped to its job.
- The OWASP Non-Human Identities Top 10 lists NHI Reuse, Overprivileged NHI and Long-Lived Secrets as risks.
- Shared accounts cause wider blast radius, lost attribution in logs, no targeted revocation, permission creep and weak access reviews.
- Replicas of the same agent version can share an identity because they are the same principal.
- Migration path: inventory users of the account from 30 days of logs, record actual permissions, create per-agent identities, assign owners, cut over one agent at a time, then disable and delete.
- Opencontroller provides discovery of agents and API keys, Posture checks, a governed registry, agent workload identity federation, delegated on-behalf-of identity and per-agent Block and Quarantine.
- Opencontroller pricing starts from $250K per deployment per year.

## Related

- [Are AI agents non-human identities?](https://opencontroller.lyzr.com/blog/are-ai-agents-non-human-identities.md)
- [How do you run access reviews for AI agents?](https://opencontroller.lyzr.com/blog/access-reviews-for-ai-agents.md)
- [Should AI agents have their own accounts in SaaS apps?](https://opencontroller.lyzr.com/blog/should-ai-agents-have-their-own-saas-accounts.md)
- [More on Agent identity and access](https://opencontroller.lyzr.com/blog/cluster/agent-identity-and-access)
