Blog

Persistent Agent Identities With Okta and Entra

Persistent agent identities with Okta and Entra bring AI agents into the identity systems enterprises already run. A durable directory identity, short-lived credentials, and authorization tied to each action allow an agent to be governed and held accountable.

Why static credentials and anonymous agents are a governance problem, not just a security one

An agent with a working API key can reach a system without giving the enterprise a useful account of who owns it or why it has access. Authentication alone does not settle those questions. Okta’s Agent SSO announcement names three groups that make the problem worse: agents built in-house, agents built into purchased software, and agents that employees deploy without central approval. Their routes into the enterprise differ, but each can leave activity disconnected from an accountable owner.

That gap becomes visible when circumstances change. A developer leaves, but the agent keeps running. Its use case narrows, yet its permissions stay broad. If it misbehaves, there may be no central mechanism to shut it down. The enterprise lacks an inventory, ownership records, and a reliable kill switch, leaving basic questions about what exists, what it connects to, and what it can do unanswered. The access reviews, lifecycle triggers, and risk scoring already in place assume that people are doing the work, so they must change to govern agents.

What "agent identity" actually means in the context of OAuth, OIDC, and the protocols Okta and Entra already speak

A persistent identity is the agent’s durable record in the identity provider’s directory, distinct from its access credentials. Those are different things, and deliberately so. Registering an agent as a first-class principal makes it a subject of policy, while OAuth 2.0 flows issue tokens for its access. The enterprise can use its existing OAuth and authentication infrastructure rather than introduce a separate protocol stack for agents.

For machine-to-machine work, the client credentials flow produces a token scoped to the agent’s own permissions. Delegated work needs a different boundary. On-Behalf-Of or Cross App Access preserves the human user’s context when the agent reaches a downstream resource. Short-lived, task-scoped credentials take the place of stored credentials, while the directory identity stays in place.

Okta’s Agent SSO provides the entry point for agents that support Cross App Access. That open standard is incorporated as the official Enterprise-Managed Authorization extension for MCP, connecting identity-provider authorization to MCP servers. Agent SSO became generally available August 24, 2026, and registers agents in Universal Directory along with employees. Administrators use familiar policy workflows, including native governance for Anthropic’s Claude. The product is included in core Okta SSO plans at no additional cost, and its scope is connection.

Okta for AI Agents supplies that broader governance layer. Generally available May 2026 and expanded through November 2026, it discovers unregistered agents, assigns named human owners, and governs access certifications, approvals, and deactivation. It also connects agents to resources beyond Cross App Access, including service accounts, secrets, custom authorization servers, and other agents. Agent Gateway supplies runtime enforcement. Okta’s July 2026 announcement describes a gateway that validates the agent and initiating user, checks policy, and brokers short-lived credentials without agent code changes, keeping downstream credentials out of the agent’s reach.

How Microsoft Entra wires agent identity: Entra Agent ID, the On-Behalf-Of pattern, and the MCP firewall

Microsoft’s documented implementation starts by registering the MCP server as an OAuth 2.0 protected resource, enabling v2 access tokens, and connecting MCP clients through Microsoft Entra Agent ID. The server becomes an explicitly protected destination. When a supported tool needs downstream access in the client user’s context, Entra client user delegation is the preferred pattern. This is distinct from OAuth identity passthrough and avoids a fresh authentication round-trip.

The On-Behalf-Of model makes the delegation boundary concrete. An agent acting for a person should reach the downstream resource under that person’s context. Identity therefore describes more than the software making the request. It also establishes whose permissions govern the work, giving runtime authorization a basis beyond “this client has a valid token.”

Microsoft previewed Entra Agent ID for discovered local agents at Ignite 2026, using Defender and Global Secure Access to detect agents including Claude Code, OpenAI Codex, and GitHub Copilot CLI. Identity assignment starts with GitHub Copilot CLI and Claude Code. Microsoft also previewed an MCP firewall at the event. Its BRK343 demo showed a policy that lets Claude Code and Claude Desktop use only trusted servers and tools.

Lifecycle controls give those identities an expiry process for inactivity. Conditional Access policy plans let administrators set controls that agents share and rules for specific cases, with templates that can block risky agents. For permissioned administrative work, Microsoft’s MCP Server for IT Admins reached general availability at Ignite 2026, providing access to Entra and Intune data.

What registration and onboarding actually look like for a team rolling out agents today

Finding the agents is the hardest part of onboarding. Most agents currently in production are unregistered and have no owner on record, so a successful OAuth exchange is not the starting line. Internally built agents are the easiest population to register because the enterprise controls them. For purchased software, the vendor must support identity-provider integration, while agents that employees deploy must be found before they can be governed.

For a team taking on that inventory, every registered agent should have a named human accountable for it. When a developer leaves, ownership should pass to someone else so the agent does not keep running just because no one took action. Registration then follows the agent’s integration model. Agents supporting Cross App Access or standard OAuth can use Agent SSO or Entra Agent ID registration, while import integrations pull metadata from platforms such as Salesforce Agentforce, Amazon Bedrock AgentCore, Cursor, Snowflake, Databricks, Workato, and Tines.

Okta’s October 2026 Client ID Metadata Document registration lets administrators register a URL while developers manage authentication at that endpoint. Okta authenticates agents at runtime without storing credentials, removing the manual key exchange that creates key fatigue. Server configuration can also become a bottleneck. Multi-MCP Custom Auth Servers places multiple custom MCP servers behind one authorization server under one policy, reducing the repeated setup that can stall a rollout.

Enforcing least-privilege access and scoped credentials at the tool-call level

At runtime, the credential must be scoped to the task, short-lived, and isolated from the agent itself. Otherwise, the directory record is mainly an audit label attached to an overpowered connection. When the gateway forwards a tool call, it injects the downstream credential from a secrets store into the outbound request. An agent subsequently instructed to print its API key has no key in its context to print.

The permission boundary must also match the action. Per-tool, per-tenant role-based access control can tell a read operation from a delete operation on the same resource, but a server-level allowlist cannot. For delegated work, the token should reflect what the initiating user may do rather than the agent service account’s broader permissions. Over time, those permissions need review. Okta’s July 2026 Resource Access Certifications for AI Agents reviews access and adjusts it to fit changes in an agent’s scope, so a narrower job does not leave the agent with the same grant.

There should be human approval gates for file writes to production storage, database mutations, external API calls that modify state, and secret retrieval. A valid identity establishes accountability, but it does not make every proposed action prudent.

What the OWASP MCP Top 10 risks look like when agents have real identities — and what they look like when they don't

OWASP’s MCP Top 10 gives the governance gap concrete names. Its Insufficient Authentication & Authorization category covers the boundary that anonymous agents and broad credentials leave weak. Without scoped access, a compromise can expose the full reach of the available credential. Directory registration, delegated user context, and per-tool authorization constrain that reach.

Shadow MCP Servers exposes a related discovery problem. An identity policy cannot govern a connection path the enterprise does not know exists. Discovery and trusted-server restrictions belong in the same architecture as token issuance. Lack of Audit and Telemetry addresses the evidence left behind. Without identity-linked records, an incident cannot be reliably reconstructed around the agent, the initiating user, and the resulting action.

Intent Flow Subversion tests a different boundary altogether. An agent with a legitimate identity can still be steered by a malicious contextual payload, so registration does not cure prompt injection. With credential isolation, that agent has no downstream secret to expose because it never received one, and scoped permissions and approval gates limit what it can run. Identity changes the risk posture by providing enforceable boundaries and accountability. It is not a certificate of good judgment.

Audit, observability, and what a complete trace looks like when agent identity runs through the IdP

Identity must remain attributable from the agent’s decision through the tool call and MCP server to the downstream system. A complete trace forms a continuous span tree covering the decision, call, database query, and pod it runs on, with each span tied to the initiating agent. Without that thread, logs may show what happened but fail to show who caused it.

Okta’s Agent Gateway logs the agent identity, initiating user, and transaction outcome for connections. Okta for AI Agents for Customer Identity records runtime actions in the Okta System Log, and both feed a SIEM for audit. Revocation at the gateway blocks new connections without rotating credentials or causing collateral downtime for other agents.

Security teams need the former to contain an agent, while IT and audit teams need the latter to establish what happened under whose authority. A connection log alone is not the full trace. For evidence to be compliance-grade, identity must link every layer and stay with the work after the identity provider issues a token.

Where an MCP gateway fits in the architecture when Okta or Entra is the identity plane

Okta and Entra establish who the agent is and what it is allowed to do. An MCP gateway enforces those decisions when a tool call crosses the boundary into a system. The identity provider supplies the directory record, token issuance, policy definition, lifecycle management, and audit forwarding, while the gateway applies controls to the actual request.

Uniform OAuth 2.1 enforcement creates a single hardened ingress in place of separate MCP server entry points. Per-tool, per-tenant authorization adds more detail to the policy set at registration, while credential injection keeps downstream secrets out of the agent. Schema validation, host allowlists, timeouts, and size limits constrain each call. Prompt injection detection, output validation, rate limiting, and an immutable audit trail are also controls at that same enforcement boundary.

When the gateway sits between agents and systems, new hires and new agents get access through approved credentials, without anyone having to hand out secrets or set up each system on its own. The persistent identity remains in the enterprise directory, while credentials and permissions are applied where work happens. Agents join the existing control model instead of becoming a second population governed by a drawer full of keys.