Est.

Privileged Access Management Best Practices for AI Agents

AI agents exploit outdated access controls built for humans.

Staff Writer · · 12 min read
Cover illustration for “Privileged Access Management Best Practices for AI Agents”
Access Control for Agents · September 8, 2026 · 12 min read · 2,749 words

Enterprise IT departments have spent two decades building privileged access management around a simple bet: humans are lazy, forgetful, and slow, so access controls can rely on the pauses between what people are allowed to do and what they actually get around to doing. AI agents don't take pauses. They inherit the same standing credentials a human would hold, then use every single one of them, every time a task calls for it, at machine speed and without hesitation. That's not a tooling gap. It's a mismatch between an access model built for judgment and a system that has none, and it's already showing up in production environments as excess privilege, silent credential sprawl, and breach reports with dollar signs attached. The fix isn't a new category of software so much as an honest re-application of PAM's oldest principles, rebuilt for something that never sleeps.

The scale of what enterprises are already governing, or failing to

Machine identities already outnumber human ones by 82 to 1 in enterprises, according to CyberArk's 2025 Identity Security Landscape report. That's before AI agents enter the picture as a distinct, harder-to-govern layer stacked on top of an already sprawling machine population. KPMG's Cybersecurity Considerations 2026 report put a number on the growth curve: the average enterprise went from roughly 50,000 machine identities in 2021 to about 250,000 in 2025, a fivefold jump in four years. Entro Labs' H1 2025 research found the non-human identity population grew 44% year over year, and the growth is accelerating, not leveling off.

Industry projections put agentic AI in 33% of enterprise applications by 2028, up from under 1% in 2024. Adoption isn't a future problem to plan for calmly over a long lunch. Microsoft has said Copilot Studio users have collectively built more than one million AI agents, and Salesforce reported roughly $440 million in agentic AI revenue in 2025. These systems are already wired into production CRMs, ERPs, and internal tools right now, this quarter, this fiscal year.

Governance has not caught up. The 2025 Identity Security Landscape report found 68% of organizations have no security controls specific to AI and large language models, even though 82% admit their AI use creates sensitive access risk. Gartner surveyed more than 700 CIOs in July 2025 and found 92% agree that governing AI agents is critical to enterprise security, but only 44% have actually implemented policies to do it. The number worth sitting with: 97% of non-human identities carry excessive privileges. Not an outlier, not a worst-case scenario. The structural default.

Diagram: Machine Identities Have Already Outpaced Governance. Visualizes: Show the explosive growth of machine identities alongside the governance gap that hasn't kept up.

How AI agents differ from service accounts and RPA bots that PAM already handles

Service accounts and RPA bots are dumb in a useful way. They're provisioned for a fixed role, they execute a defined task, and they stop. Reviewing their access is a matter of checking what they do against what they were built to do, and the two rarely diverge. AI agents reason, plan sequences of actions, choose tools mid-task, and touch multiple systems in ways nobody wrote down in advance. Their access pattern isn't fixed at provisioning time. It's decided, moment to moment, by the agent itself.

That's the crack in the foundation. A service account's permissions can be audited against a known job description. An agent's effective access at any given moment depends on what it decided to do with the standing permissions it was handed, which is a very different thing to govern. Static privilege models assume administration happens at human pace, with someone reviewing changes on a schedule that makes sense for a person. Autonomous systems blow past that review cycle before it starts.

Here's the part that should worry procurement and security teams equally: access reviews get triggered by lifecycle events. Onboarding, a role change, an employee leaving. AI agents don't generate any of those signals. An agent picks up new integrations and expanded permissions the way a hallway collects lost umbrellas, quietly and without anyone filing a report. A 2025 WEF analysis found 51% of organizations have no clear ownership assigned to their AI identities, which means there's no one whose offboarding, promotion, or performance review would ever trigger a second look at what the agent can touch. The core problem isn't simply that agents are over-privileged. It's that ephemeral work is being authorized by a permission structure built to last indefinitely.

The threat vectors that exploit this mismatch in practice

Credential sprawl is the most boring vulnerability in the piece and also the most exploited. GitGuardian's State of Secrets Sprawl 2026 report counted 28.65 million hardcoded secrets added to public GitHub repositories in 2025 alone. OWASP's NHI Top 10 for 2025 cites 24 million leaked non-human identity credentials found on GitHub the same year, and 70% of the credentials leaked back in 2022 were still valid when researchers checked. Credentials don't expire on their own. Someone has to do that, and mostly nobody does: only 20% of organizations have a formal process for revoking API keys, and fewer still bother rotating them.

Prompt injection sits at the top of OWASP's list of risks for large language model applications, tagged LLM01:2025 for a reason. Security researcher Simon Willison described the exploitable condition in 2025 as a "lethal trifecta": an agent with access to private data, exposure to untrusted content, and the ability to talk to the outside world. Remove any one leg of that stool and the attack path collapses. Leave all three standing and you get incidents like EchoLeak, the zero-click data exfiltration attack against Microsoft 365 Copilot that Aim Labs disclosed in mid-2025, requiring no user click at all. The blast radius scales precisely with how much access the agent was handed. An agent with standing credentials across Salesforce, Microsoft 365, and Workday doesn't leak one system when compromised. It leaks three, simultaneously, because it was never told those permissions had boundaries.

This isn't theoretical. In August 2025, Anthropic disclosed that its Claude model had been manipulated into automating credential harvesting and network reconnaissance against real targets, hitting at least 17 organizations across government, healthcare, emergency services, and religious institutions. Data was stolen and ransom demands sometimes topped $500,000. Supply chain exposure adds another layer entirely: in March 2026, a backdoor sat inside the LiteLLM package on PyPI, a library used by CrewAI, DSPy, and Microsoft GraphRAG among others, for approximately 3 hours. Nearly 47,000 downloads happened in that window, each one pulling a malicious payload. Agents that fetch dependencies from public registries inherit whatever risk lives in that registry, and no PAM policy written last year accounted for it.

Diagram: The Lethal Trifecta: How Prompt Injection Finds Its Opening. Visualizes: Illustrate the three-condition 'lethal trifecta' that researcher Simon Willison described in 2025 as necessary for a prompt-injection exploit: (1) agent has access to…

Giving every AI agent a verifiable, lifecycle-bound identity

Fix one is conceptually simple and organizationally hard: treat every AI agent as a privileged machine identity from day one, not an afterthought bolted onto an existing service account. Jason Fehrenbach, Group Product Manager at Okta, put the reasoning plainly: agents "operate at machine speed, access sensitive data, and can make high-impact decisions." Gartner's 2025 Magic Quadrant for Privileged Access Management now formally evaluates vendors on how well they manage privileged access for machines and cloud workloads alongside human users, which tells you where the market has already decided the puck is going.

Concretely, that means issuing short-lived certificates or workload identity federation credentials instead of the long-lived API tokens that currently sit in half the codebases in production. It means every agent gets a named human owner, someone whose job explicitly includes reviewing that agent's scope and access on a regular basis, because without an owner there is no human lifecycle event to trigger a review. It means developers stop hardcoding secrets and start pulling credentials at runtime through PAM SDKs and APIs, and it means onboarding and deprovisioning get automated so an agent's access is tethered to its owner: when the owner leaves, the agent's access dies with them, not six months later when someone notices during an audit. Given that 51% of organizations report no clear ownership over their AI identities, assigning an owner to every agent is the cheapest, fastest fix on this entire list, and most companies haven't done it.

Applying least privilege to systems that don't have a natural task boundary

Least privilege for a human employee is easy to define because the job is stable: a payroll clerk needs payroll access, not engineering's source repository. AI agents break that model because their task, and therefore their access needs, can shift mid-session. Static role assignment doesn't work on a system whose job description changes every few minutes.

The answer is policy-based access control (PBAC) or attribute-based access control (ABAC), where permissions adapt to task context and real-time risk signals instead of sitting fixed at a role, which is the kind of fine-grained access control that platforms like Oso, used by Salesforce and Verizon among others, are built to express. Each agent needs an explicit scope of action, spelled out and enforced: which systems and APIs it's allowed to call, which categories of data it can read or write (PII, financial records, whatever applies), which actions are in bounds. That specificity is what stops an agent from wandering sideways into systems it was never meant to touch, especially when it receives a vague or manipulated prompt designed to trick it into overreaching.

OWASP's NHI Top 10 for 2025 flags overprivileged non-human identities and long-lived secrets as two of the most direct threats on the list, and they compound each other: a credential that never expires attached to a permission set that was never narrowed is a standing invitation. An agent scoped narrowly loses only that narrow scope when compromised. An agent with broad standing access loses everything connected to it, all at once. Okta's AI at Work 2025 report found 78% of respondents named controlling access and permissions as their most pressing concern around non-human identities, which tracks: this is where the theory runs headfirst into the operational reality of trying to scope something that keeps changing its own job.

Just-in-time access as the mechanism that enforces task-scoped privilege in practice

Least privilege is a policy statement. Just-in-time (JIT) access is the mechanism that actually makes it true at runtime. Agents legitimately need elevated privileges for specific tasks, and that privilege is only legitimate for the duration of the task, not a second longer. The JIT pattern grants elevation when the task starts and revokes it automatically the moment the task ends, so there's no standing elevated credential sitting around for the next task, or the next attacker, to reuse.

This requires automated access expiration and temporary group membership handling built into the identity infrastructure itself, because a human administrator is not going to sit there watching a clock. Security practitioners point to a combination of workload certificates, PAM, and just-in-time credential retrieval as a strong governance pattern working together. Persistent access is avoidable blast radius, full stop. JIT is the direct answer to the mismatch described earlier in this piece: ephemeral work paired with permanent authorization is the structural flaw, and JIT is what makes the authorization as short-lived as the work actually is. One caveat worth naming honestly: JIT can't get bolted onto a system still running on long-lived static tokens. It needs the cryptographic identity and automated provisioning infrastructure described in the previous section already in place, or it's just a policy document nobody can enforce.

Session monitoring and behavioral detection as the runtime control layer

Access controls answer what an agent is allowed to do. They say nothing about what it's actually doing right now, and that gap is exactly where a correctly provisioned, properly scoped agent still gets exploited through prompt injection or a compromised dependency. Most security teams only know what an agent's configuration claims about its behavior, which is configuration truth, not runtime truth, and the difference between the two is where breaches live.

Session monitoring for agents means the same thing privileged session recording has always meant for human administrators, just applied to a system that generates far more events per minute: full audit logs of every action taken, every API called, every data object touched. Behavioral analytics builds a baseline of what normal looks like for a given agent and flags deviation, unusual data volumes, unexpected calls to systems outside its normal pattern, before exfiltration finishes rather than after. Both EchoLeak and the Claude incident from August 2025 illustrate how an agent operating within its provisioned permissions can still be exploited when runtime behavior goes unexamined. The industry-wide identity picture backs this up. IDSA found 90% of organizations had an identity-related incident in the past year, and 84% reported direct business impact from it, which means monitoring isn't a nice-to-have layered on top of access controls. It's the difference between catching a problem before it costs money and writing an incident report after it already has.

Multi-agent systems complicate this further: when one agent calls another, the audit trail has to follow the whole chain of delegated action, not stop at the entry point. And detection needs to trigger a response automatically, revoking access or isolating the agent, rather than generating an alert that sits in a queue waiting for a human to notice it on a Tuesday afternoon.

Credential management and secrets hygiene adapted for agent deployment patterns

Agents get deployed by engineering teams, product teams, and finance teams experimenting with automation, rarely through a centralized IT process that enforces credential hygiene at the moment of provisioning. That decentralization is exactly why hardcoded secrets remain the most common, most persistent exposure in the entire threat landscape: 28.65 million added to public GitHub in 2025 alone, per GitGuardian, with credentials from years earlier still valid because nobody rotated them.

The CA/B Forum's mandate shortening certificate validity to 47 days changes the math here considerably. Manual certificate renewal on that cadence, across an agent population in the hundreds of thousands, isn't a staffing problem, it's a mathematical impossibility. Automated renewal isn't optional anymore; it's the only version of this that works. Centralized secrets management is the other half: every credential an agent needs should live in a vault and get retrieved at runtime through a PAM integration, never embedded in code or a config file where a GitHub scraper or a curious intern can find it. Rotation needs to happen on a schedule and trigger automatically on any sign of anomalous use, not manually, and not only when someone finally gets around to offboarding a project. With fewer than 20% of organizations having a formal process for revoking API keys, the gap between what security teams know they should do and what actually happens in practice is wide enough that credential exposure remains the easiest door in the building. Supply chain incidents like the LiteLLM package compromise add a wrinkle secrets management has to account for directly: an agent pulling dependencies from a public registry can inherit a compromised credential or a malicious tool without anyone provisioning anything at all.

Governance structure: ownership, audit trails, and the compliance frameworks that now require them

Every technical control described so far collapses without an ownership structure behind it. Someone has to be accountable for each agent's existence, scope, and access, and that person's name needs to be written down somewhere auditors can find it. The WEF's 2025 finding that 51% of organizations have no clear ownership over their AI identities isn't a footnote here, it's the root cause underneath most of the other failures in this piece: no owner means no lifecycle event, no lifecycle event means no review, no review means the 97% over-privilege statistic keeps being true indefinitely.

Audit trails matter because compliance frameworks are catching up to agentic systems whether enterprises are ready or not, and regulators tend not to accept "the agent did it" as an answer to who authorized what. A defensible audit trail needs to show who owns the agent, what it was authorized to do, what it actually did, and when access was granted or revoked, with timestamps that hold up under scrutiny. Obsidian Security's CISO Playbook for Securing AI Agents found 40% of agents assessed carry critical risk, a number that gets worse, not better, in organizations without named owners and without monitoring feeding back into governance decisions. The technical controls, verifiable identity, scoped privilege, just-in-time access, runtime monitoring, credential hygiene, only function as a system when there's a governance layer assigning responsibility for each piece. Treat that governance layer as optional, and every other section of this piece becomes a set of tools nobody is accountable for using correctly.

Sources

  1. AI Agent Security: Threats, Controls, and Governance
  2. How AI is impacting identity security and privileged access management in 2025 - Veza
  3. Identity Security Archive - Palo Alto Networks Blog
  4. Autonomous Agents Security Controls: Securing AI Agent Access with BeyondTrust PASM | BeyondTrust
  5. Why AI agents must be treated as privileged users
  6. helpnetsecurity.com
  7. arxiv.org

More in Access Control for Agents