Microsoft Entra ID Flaw Let Attackers Hijack Any Service Principal
Silverfort researchers discover Microsoft's AI agent management role could be abused to take over arbitrary service principals in Entra ID tenants. Microsoft patched the privilege escalation flaw on April 9.
A privileged role Microsoft created for managing AI agent identities could be exploited to hijack arbitrary service principals across an entire Entra ID tenant. Silverfort researchers disclosed the vulnerability after Microsoft quietly patched it on April 9, 2026.
The Agent ID Administrator role—introduced as part of Microsoft's push to support AI agents in enterprise environments—was supposed to be scoped narrowly to agent-related identities. Instead, it granted far broader permissions that enabled complete service principal takeover.
How the Attack Worked
Silverfort researcher Noa Ariel discovered that users assigned the Agent ID Administrator role could add themselves as owners of any service principal in the tenant, not just AI agent identities. Once established as an owner, the attacker could inject new credentials and authenticate as that service principal.
"That's full service principal takeover," Ariel explained. "In tenants where high-privileged service principals exist, it becomes a privilege escalation path."
The attack chain followed a predictable pattern:
- Attacker with Agent ID Administrator role enumerates service principals using Microsoft Graph API or Azure CLI
- Attacker identifies service principals with elevated permissions—particularly RoleManagement.ReadWrite.Directory or other high-impact Graph permissions
- Attacker uses the role to add themselves as owner of the target service principal
- Attacker injects new credentials (password or certificate) for the compromised identity
- Attacker authenticates as the service principal and inherits all its permissions
The vulnerability existed because Microsoft's permission model for the Agent ID Administrator role "was not strictly limited to agent-backed objects." The role could modify ownership for service principals it was never designed to manage.
Scope of Impact
Silverfort's research indicates about 99% of business Entra ID tenants have at least one privileged service principal. Many organizations use service principals for automation, CI/CD pipelines, and application integrations—often granting them broad permissions for convenience.
A compromised service principal with Global Administrator permissions would give an attacker complete control over the tenant. Even less privileged service principals could enable lateral movement, data exfiltration, or persistence mechanisms.
The vulnerability particularly threatens organizations that have adopted AI agent capabilities. These organizations are more likely to have provisioned the Agent ID Administrator role, creating the necessary precondition for exploitation.
This flaw adds to a pattern of identity management vulnerabilities we've tracked this year, where authentication and authorization systems fail to properly scope permissions.
Microsoft's Response
Microsoft rolled out fixes across all cloud environments on April 9, 2026—approximately six weeks after Silverfort's responsible disclosure on March 1. The patch prevents users with the Agent ID Administrator role from modifying ownership of non-agent service principals, returning a "Forbidden" error for such attempts.
Microsoft has not assigned a CVE to this vulnerability, treating it as a configuration issue rather than a software flaw. This is consistent with how cloud providers often handle identity and access management bugs—they can be patched server-side without customer action.
Detection and Mitigation
Organizations should audit their Entra ID environments for signs of exploitation during the vulnerable window:
- Review Agent ID Administrator role assignments - Identify all users who held this role since its introduction
- Audit service principal ownership changes - Look for unexpected owner additions between role introduction and April 9 patch
- Check for credential additions - Review password and certificate additions to privileged service principals
- Monitor for suspicious authentication - Look for service principal authentications from unexpected locations or applications
For organizations that detected suspicious activity, the compromised service principals should be rotated immediately. Simply removing attacker-added credentials is insufficient if the attacker established persistence through other means.
Why This Matters
Microsoft's AI agent infrastructure represents a new attack surface that security teams are still learning to monitor. The Agent ID Administrator role is just one component of Microsoft's broader Copilot and AI agent ecosystem, which introduces new privileged roles, API permissions, and identity types.
The vulnerability also highlights the recurring challenge of permission scope creep in cloud identity systems. Roles designed for narrow purposes often inherit broader permissions than intended, either through design oversight or implementation bugs.
This incident should prompt organizations to review all privileged role assignments in their Entra ID tenants—not just the Agent ID Administrator role. Microsoft's identity platform has grown increasingly complex, and misconfigured permissions remain one of the most common paths to cloud compromise.
Security teams managing Microsoft 365 or Azure environments should treat identity management as a critical control plane. When attackers compromise identity infrastructure, they gain persistent access that survives traditional incident response measures like endpoint reimaging.
Related Articles
ASP.NET Core Bug Lets Attackers Forge Auth Cookies for SYSTEM Access
Microsoft releases emergency patch for CVE-2026-40372 (CVSS 9.1), a critical ASP.NET Core flaw allowing attackers to forge authentication cookies and gain SYSTEM privileges on Linux and macOS servers.
Apr 28, 2026Pack2TheRoot: 12-Year-Old PackageKit Bug Grants Root on Linux
CVE-2026-41651 lets any local user gain root privileges on Ubuntu, Debian, and Fedora via a TOCTOU race in PackageKit. Patch to version 1.3.5 immediately.
Apr 24, 2026Azure Kubernetes CVE-2026-33105 Hits CVSS 10.0
Microsoft Azure Kubernetes Service has a critical auth bypass (CVE-2026-33105) with a perfect CVSS 10.0 score. Unauthenticated attackers can escalate to cluster admin—patch now.
Apr 3, 2026WordPress Plugin Flaw Gives Attackers Admin Access Without Login
CVE-2026-23550 in Modular DS plugin scores CVSS 10.0. Active exploitation began January 13, with 40,000+ sites at risk.
Jan 28, 2026