Group Managed Service Accounts for AI Agent Workloads
Why gMSA, designed for Windows services, fails to secure AI agents spawned per session.

Group Managed Service Accounts were built to solve a boring problem that happened to be one of the most common causes of breaches in Windows environments: the static service account password that nobody rotates because rotating it means scheduling downtime, tracking down every config file it touches, and hoping nothing breaks. For Windows-hosted workloads, this is a genuine upgrade over the old pattern: it removes the rotation burden, cuts down the window for brute-force and dictionary attacks against a credential that never changes, and puts lifecycle management in one place instead of scattered across however many servers run the service.
Windows Server 2025 pushed this further with the Delegated Managed Service Account, a new account type that ties authentication to the identity of the device requesting it rather than handing the credential to any host that asks. The password itself never leaves the Domain Controller, so it stays there instead of sitting retrievable on an authorized server. That is a meaningful security improvement over the gMSA model, closing off a path where a compromised host could pull the credential and use it elsewhere. It is still, by design, a Windows and Active Directory mechanism, built for the same category of workload gMSA was built for.
That is a Windows service, running continuously or on a schedule, authenticating to other Windows resources (SQL Server, file shares, other domain members) under one account that doesn't change identity based on what it's doing in a given hour, unlike AI agents, which are spawned per session, act on behalf of a specific delegating human, have time-bounded scope tied to a task, and may spawn sub-agents of their own. They were built to make that one fixed job safer to run unattended.
AI Agents as a Workload
An AI agent does not sit on a server the way a Windows service does, waiting to be queried. It gets spawned for a session, does the task in front of it, and often disappears. It acts because a specific person asked it to, for a specific purpose, for a window of time that closes when the task does, and it may spin up sub-agents of its own along the way. A Windows service running against SQL Server was never built for any of that.
The sharpest break from the service-account pattern is delegation. A service account's permissions belong to the account, set once at provisioning and left alone until someone changes them. An agent's legitimate authority depends on who asked it to act, what they asked it to do, and how long that request should remain valid. IAM practitioners call this scoped delegation, as opposed to standing access. A service account has standing access by design. An agent that holds standing access is already misconfigured, because its authority is supposed to expire with the task.
Add to that the environment mismatch. Most agent runtimes run on different operating systems, in containers, built for cloud-native deployment, the opposite of the domain-joined Windows estate gMSA assumes, and gMSA needs a supported Active Directory environment and a domain controller running Windows Server 2012 or later. Plenty of agent infrastructure has no AD membership to speak of, and bolting one on for the sole purpose of issuing gMSAs would be building a courthouse to settle a parking ticket.
The scale compounds all of it. The Cloud Security Alliance's Agent Identity Governance Framework already finds non-human identities outnumbering human ones by more than 90 to 1 in many organizations, and AI agents push that ratio up further because they operate at machine speed, not human speed. A workload class defined by short lifespans, delegated authority, non-Windows runtimes, and sheer numeric growth is a different animal wearing the same badge as the Windows service.
The four structural places where gMSA breaks for AI agent workloads
gMSA's design assumptions fail AI agent workloads in four distinct ways, and each failure traces back to one of the properties just described, not to any defect in gMSA itself.
The first is audit trail collapse under shared identity. When several agent instances run under one gMSA, every action in the logs attributes back to that single account. An investigator trying to reconstruct an incident cannot tell which agent session did what, because the identity layer was never built to distinguish them, and it cannot separate "what the agent did" from "what the application did" when both run as the same name. That is the audit failure practitioners point to when they describe the service-account-as-agent pattern: not that logging fails, but that the logs answer the wrong question.
The second is the absence of per-task scope expression. A gMSA's permissions are set at provisioning and sit there until someone changes them by hand. An agent's legitimate scope moves with the task, because the task changed, and gMSA has no built-in way to express that variance or enforce it. The account either stays locked to a narrow permission set that breaks half the agent's real workload, or gets provisioned broadly enough to cover everything the agent might ever need; that wider failure mode is described next.
The third is credential blast radius, and the consequence is not hypothetical. If you want to stop this pattern of credential harvesting and lateral movement, carried out through legitimate agent sessions in under six hours, you need enforceable policies on what actions an agent may take, ones that can block and not just log. That incident involved a cloud service account rather than gMSA specifically, but it illustrates the mechanism precisely: when one identity carries broad standing privilege and nothing is watching what it does with that privilege in real time, the account becomes the attack surface the moment it's compromised, and the clock between compromise and full campaign runs in hours, not days.
The fourth is the absence of sub-agent accountability. An agent that spawns a child agent to handle part of a task has no mechanism, under gMSA, to hand that child a narrower slice of its own authority. Either the child inherits the parent's full gMSA-backed access, or someone has built a workaround outside the identity system entirely, in which case the identity system has stopped governing the thing it was meant to govern.
Where gMSA still fits
None of this makes gMSA the wrong tool everywhere. For a Windows-hosted agent service that behaves like a fixed, persistent application process, such as a scheduled data pipeline running as a Windows service or an agent framework authenticating against SQL Server or another AD-backed system, gMSA remains a net improvement over static credentials and should be the default choice.
Enterprise security architects defending that position have a legitimate point. If organizations with existing Windows-heavy AD estates abandon gMSA for SPIFFE/WIMSE, they take on significant operational complexity and a dependency on infrastructure many teams do not operate. Telling a bank's identity team to rip out twelve years of AD tooling because a research paper describes a better model for autonomous agents is not an argument, but a tantrum.
The more useful framing comes from Gartner's workload IAM model, as read by NHIMG: agents should be governed as workloads first, meaning ownership assigned, runtime boundaries set, and policy checked before any credential gets issued at all, regardless of which mechanism issues the credential underneath. Under that framing, gMSA is one acceptable answer to "how do we issue and rotate the credential," but it was never an answer to "who owns this agent, what is it allowed to touch right now, and who notices when it stops behaving." Treating gMSA as the floor rather than the whole structure resolves the tension: keep it where the workload genuinely behaves like a Windows service, and build the governance layer most organizations are currently missing around it rather than instead of it.
What the Windows platform is doing about agent identity
The most convincing evidence against relying on gMSA alone does not come from a competing standards body. It comes from Microsoft's own roadmap. The architectural properties Microsoft has been building toward for agent identity are the exact ones gMSA cannot supply: credential-free operation through managed identities, permissions granted per agent rather than per shared account, full lifecycle handling from creation to retirement, and activity logs that separate what an agent did from what a human or application did.
dMSA is the clearest data point. It fixes the specific problem of a credential sitting retrievable on an authorized host by binding it to the Domain Controller instead, a real security gain. But it stays inside the Windows and AD envelope, and it does nothing for the agent runtimes living outside that envelope, on other operating systems, in containers, across cloud providers. dMSA is best read as Microsoft hardening the existing model, not replacing it with something built for agents from scratch. When the vendor that owns the gMSA standard builds its next iteration and still scopes it to the same AD boundary, that is the company telling its own customers where the model's edge sits.
The standards layer that fills the gap gMSA leaves open
Outside the Windows world, a standards consensus has formed over roughly the past year and a half, mapped in the IDSync 2026 landscape report as a three-layer stack. SPIFFE/WIMSE answers "what is this agent," providing workload identity independent of any particular domain or directory. OAuth 2.1, applied through the Model Context Protocol's authorization spec, answers "what may it touch," handling delegated access at the point an agent actually calls a tool or a resource. The IETF's Identity Assertion Authorization Grant answers "who governs the delegation," brokering enterprise-level control over what gets delegated and to whom. OpenID's AuthZEN sits on top as the fine-grained decision layer, evaluating specific access requests against policy.
The MCP layer deserves particular attention because it changed substantially and recently. Its July 2026 revision, the largest since the protocol launched, dropped Dynamic Client Registration in favor of Client ID Metadata Documents, made the protocol stateless, and tightened how tokens bind to the sessions that requested them. If your agent-auth architecture was designed against the 2025 version of MCP, you now have migration work to do before you can claim to follow current practice.
Across the vendors building on this stack, five product elements appear repeatedly enough to call them a pattern rather than a coincidence: a registry that tracks every agent as a discrete entity, a human sponsor bound to each one, credentials issued short-lived and scoped rather than standing, enforcement built into the MCP layer itself, and authorization checked at runtime rather than only at login. IAM practitioners describe the resulting shape as per-agent-session identity with scoped delegation, which is another way of saying each agent session gets its own narrow, temporary authority instead of borrowing a permanent one.
The three controls that must be layered on top of gMSA for Windows agent workloads
None of this requires abandoning gMSA on Windows infrastructure where it already does its job well. You need to add three controls gMSA was never built to provide, because gMSA handles rotation but leaves scope, visibility, and enforcement open.
The first is scope tied to task rather than role. The gMSA itself should carry only the minimum permissions needed for the narrowest task the agent runs. Where the agent's work varies in what it touches, short-lived, per-task tokens, scoped to that specific delegation and expiring with it, should sit on top of the gMSA base identity. This is scoped delegation through OAuth-style tokens layered above the account, a partial scoping mechanism rather than a replacement of the account or an impersonation of whichever human launched the session.
The second is runtime monitoring for behavioral drift. gMSA's scope gets declared once, at provisioning, and Active Directory has no mechanism to notice when an agent's actual runtime behavior wanders from that declaration. Tracking what the agent actually touches, in what order, against what it was supposed to be doing, catches that drift before it becomes an incident rather than after. The CSA's Agent Identity Governance Framework frames this as the central gap: legacy IAM was built to govern a different kind of identity than the one enterprises are now running at scale.
The third is policy enforcement at the action level rather than the login level. Authenticating the agent to the domain says nothing about what it's permitted to do once it's in. If you want to stop the GTIG-documented pattern of credential harvesting and lateral movement that can run its full course in under six hours, you need enforceable action-level policy that can block a request, not just log it after the fact.
The urgency behind all three isn't abstract. The Cloud Security Alliance's "Securing Autonomous AI Agents" survey found that only 28 percent of organizations can trace an AI agent's actions back to a human sponsor across every environment they run. Arrival effects aside, the identity architecture underneath audit logs lumps agent activity and application activity into the same account, so the logs cannot trace which did what.
Sequencing the transition for organizations already running gMSAs
Nobody tears out a working credential system overnight, and the CSA framework's tiered roadmap gives a reasonable order to the work: inventory and baseline first, then partial automation with lifecycle controls that are still inconsistent, then full just-in-time orchestration.
Inventory comes first because nobody can govern what they haven't counted. That means you have to find every agent workload currently running, which gMSA or service account each one authenticates through, and what permissions that account actually carries today, not what someone assumed it carried when it was provisioned earlier. If organizations skip this step, they usually find out during an incident, not before one, that an agent built for a three-week pilot has been running under a service account with domain-wide read access since the pilot ended, because nobody remembered to turn it off.
The second phase layers scoped tokens, runtime monitoring, and action-level policy onto the gMSA accounts, which remain a genuine improvement over static service accounts for Windows-hosted workloads by eliminating the credential-rotation burden, reducing brute-force exposure, and centralizing lifecycle management in AD, while standing up the SPIFFE/WIMSE stack for the agent runtimes that don't live in AD at all. This phase runs long and looks messy by design, because identity models are operating side by side while the organization figures out which agents belong in which category.
The third phase is the payoff: just-in-time orchestration, where credentials and permissions get issued at the moment of need and expire the moment the task ends. Getting there does not require declaring gMSA obsolete. It requires admitting what gMSA was always built to do, doing that well, and building the rest of the governance model around it for the agents that were never going to fit inside a Windows service account to begin with.
Sources
- The State of AI Agent Identity 2026 — IDSync Landscape Report
- AI agent identity lifecycle — what your IAM program needs in 2026
- AI agents as workloads: the workload IAM model practitioners need
- Agent Identity Governance Framework
- GTIG AI Threat Tracker: From Prompting to Autonomy
- Agentic AI Identity Management Approach


