When the Audit Trail for AI Agent Actions Must Satisfy Your IdP Governance Team Not Just Engineering
Governance reviewers need agent identity, owner, delegation, and policy in every log.

An enterprise MCP gateway with role-based access control and audit logging must connect tool-level decisions to identities in the organization’s existing IdP, such as Okta or Entra ID. For AI agent actions to satisfy IdP governance, its records must identify the agent and human owner, preserve delegation, and name the policy behind each decision. Engineering traces explain execution. Governance records must establish accountability.
Why engineering logs and IdP governance logs are structurally different things
An MCP agent calls a database tool, and the engineer sees a clean request/response trace with timing and no error. The IdP governance team asks, “whose credential authorized that?” The trace cannot answer the question. MCP, the Model Context Protocol, connects AI agents to tools, but recording that connection does not establish who authorized its use. A successful call is evidence of execution.
Engineers need to debug failures, trace latency, and reproduce errors, while governance teams need a named identity, a policy evaluation, and delegation back to a human. Adding more request details will not supply a missing owner. A traditional API gateway has a similar blind spot when it handles traffic without knowing what the agent is doing or on whose behalf it acts.
Kumar et al.’s production deployment paper shows what happened when teams built MCP authentication systems on their own. Organizations lacked a consistent way to authorize callers, track actions, or offboard a departing employee across the fleet. Offboarding is the decisive test here. A log may explain every request perfectly while the organization still has no way to end the access behind it.
What IdP governance teams actually require from an audit record
Identity attribution needs a persistent, registered non-human identity in the same IdP that manages employees. A shared API key is not enough. Without an agent identity that survives individual sessions, reviewers cannot reliably connect separate actions to the same accountable actor.
Human ownership requires the name of the person whose lifecycle governs the agent’s access. That owner must be explicit in the record. Otherwise, offboarding requires investigating which credentials and service accounts belonged to the departing employee before making the access change.
Policy linkage needs the exact rule that led to each allow or deny decision. The outcome alone proves too little. A successful call does not show that the correct policy was applied, and a failed call does not establish that policy stopped it.
Delegation requires the credential’s path from the directory to the agent. For user-delegated work, that means the user, token exchange, and resulting agent credential. The paper distinguishes user token exchange, workload service account, and user service account flows, each requiring its own complete attribution record. Without the flow and its chain, reviewers cannot distinguish a user’s delegated action from a workload acting independently under a human owner.
Why MCP's default authentication landscape makes those requirements nearly impossible to meet today
Enterprise MCP fleets often reflect separate teams’ authentication choices. The production paper describes servers with no authentication, static API keys, and full OAuth implementations. These signals do not fit together by themselves. A static key does not identify a person or expire because that person leaves, so attributing its use requires investigation outside the log.
Local STDIO-based servers create a different gap because they run as processes on a developer’s machine without generating network traffic. A network-based governance trail cannot record calls it never sees. Meanwhile, remote servers leave records across disparate systems, forcing teams to stitch together fragments. That stitching cannot recover an identity or policy chain that was never recorded.
Protected Resource Metadata (RFC 9728) and resource indicators (RFC 8707) entered the specification in June 2025, while the July 2026 revision further tightened authentication requirements. Those requirements do not retrofit the servers already running without them. The fragmentation is therefore not just a configuration error to patch server by server. It requires a governance layer above the servers.
How a centralized MCP gateway produces the identity and policy record governance needs
A centralized MCP gateway provides one point where identity is validated, policy is evaluated, and attribution is recorded. Authentication normalization answers the identity requirement by presenting agents with a single OAuth 2.1 interface while handling different downstream authentication methods internally. The identity signal must survive that translation. Otherwise, the gateway merely gives fragmented credentials a common front door.
Human ownership comes from the gateway’s link to the directory-managed agent record. Delegation comes from preserving the originating user and agent identities through token exchange, including the RFC 8693 flow used for user-delegated access. Neither can be inferred from a downstream key.
Policy linkage needs authorization for each tool call, with rules based on directory group membership. This is where MCP awareness earns its keep. The gateway parses dynamic tool schemas, filters tools/list by user identity, and inspects tools/call payloads rather than treating every request as generic JSON-RPC. Its record can therefore name the actual tool and the rule that governed access.
The policy engine should be distinct from the gateway’s data path so rule changes do not require redeploying the proxy. The gateway is the enforcement point.
What the agent identity record must look like to pass IdP governance review
The agent equivalent of an employee record needs a persistent identifier, a human owner, a defined scope, an expiration, and a lifecycle state. Each field supports a familiar review task. The identifier distinguishes the agent across sessions, the owner establishes responsibility, and the scope defines permitted work. Expiration and lifecycle state show whether its access should still exist.
Unregistered agents, shared service accounts, and borrowed human credentials each make it harder to tell who is accountable. Borrowed credentials are especially misleading because the resulting action looks human. The OpenID Foundation’s framework for Identity Management for Agentic AI argues that agents should no longer act as if they are the user. Delegation belongs in the credential.
Microsoft’s Entra Agent ID gives agents identities in Entra and integrates with Conditional Access, identity protection, and Microsoft Purview. The platform became generally available in April 2026. It illustrates the directory model governance requires, but an agent identity still needs appropriately bounded credentials. Short-lived, task-scoped tokens make the permitted tools and expiration auditable.
Tool-level role-based access control then ties that identity to the tools it can use. Directory groups map to roles, roles receive grants per server, and grants narrow to individual tools. Authorization runs on every call. Once a directory removal syncs, the agent’s next tool call should be denied without a separate gateway update.
What the audit log entry for a single tool call must contain, field by field
Agent identifier must name the persistent non-human identity registered in the IdP. A session token or IP address cannot take the place of that identity. Without this field, reviewers cannot reliably connect the call to the agent’s managed identity.
Human owner must name the responsible person in the directory in every entry. This makes ownership searchable without consulting another credential inventory. Without it, an offboarding review depends on engineering teams explaining who owns what.
Delegation chain must name the originating user and the agent identity when the agent uses token exchange to act on someone’s behalf. The flow must remain distinguishable from independent workload access. Without that distinction, the record confuses responsibility for an agent with initiation of a particular action.
Tool name and server must identify the exact tool called and where it resides. A URL or generic JSON-RPC method is insufficient. Without the tool identity, reviewers cannot establish which governed capability was used.
Policy decision must state allow or deny and identify the specific rule that produced that result. HTTP status is not policy evidence. Without the rule identifier, reviewers cannot check whether the call used the intended authorization.
Scope at time of call must record the scopes present in the credential when the action occurred. Current permissions cannot replace this historical snapshot. Without it, reviewers cannot check whether the action stayed within what was allowed.
Timestamp must be precise enough to correlate the call with IdP access logs and directory change events. Sequence is essential when permissions change. Without usable timing, reviewers cannot link a decision to a change in group membership or a Conditional Access update.
Credential expiry must record when the token used would expire. Without it, the entry cannot show whether the call took place within the token’s intended lifetime, though expiry alone does not prove that the token was protected against token replay.
Where the governance record must live and how it must flow to the IdP team's existing tools
Even a complete record leaves governance teams unable to use their normal review process if it is locked inside a proprietary gateway console. They work in SIEMs, IdP consoles, and compliance tools. The structured log must therefore reach the organization’s existing OpenTelemetry collector so records can appear in platforms such as Datadog, Grafana, or Splunk. Auditors should not need a separate AI dashboard to reconstruct access.
Delivery alone is not sufficient, however, because the record must join to the directory. Agent identifiers and human owner fields must resolve against the existing Okta or Entra tenant. That connection supports queries for tool calls attributed to employees in a particular group. An identifier that cannot be resolved is just a label.
When a group loses access to a tool, the change event and subsequent deny decisions should correlate in the same log stream. This lets auditors assess whether enforcement propagated correctly. The control plane must extend the existing stack rather than create a parallel account of access that cannot be reconciled with established audit evidence.
The shadow MCP problem: governance records you cannot produce for agents you do not know exist
A gateway can keep excellent records of the traffic it receives while missing direct connections entirely. When local STDIO servers and direct HTTP MCP servers are outside the governed path, that trail has no identity-attributed records of their calls. The dashboard may look reassuringly quiet. The dashboard is just as quiet when evidence is missing.
Local servers need endpoint-level discovery because egress monitoring cannot see calls between processes when they send no network traffic. Microsoft moved discovery of local AI agents and their configured MCP servers to general availability in Defender for Endpoint on October 29, 2026. Its coverage included more than 50 supported agents and MCP servers on Windows and macOS, tying each agent to a device, account, and MCP context. That endpoint view complements network inspection.
Once shadow servers are found, the managed control plane must become the sole ingress point, with firewall rules and service mesh configuration blocking direct agent-to-tool connections. A complete audit trail requires all agent traffic to pass through the controls that produce the identity and policy record.
What a governance team should ask when evaluating whether an audit trail actually meets their standard
A governance team should begin by asking whether every recorded tool call can be attributed to a named person in the directory without manual investigation. For delegated calls, that attribution must preserve the originating user as well as the agent’s owner. An answer that depends on asking engineering who owns a key does not meet the identity requirement.
Second, the team should ask whether each entry names the rule behind the allow or deny decision. A status code cannot answer that question. The third is whether employee offboarding automatically terminates the agents’ access after the directory change syncs, with the log reflecting enforcement. If someone has to update the gateway by hand, directory governance is no longer tied to tool access.
Fourth, the team should ask whether reviewers can query the records in their existing SIEM or observability tools and join both identities to the directory. A separate console is not an equivalent workflow. The fifth is whether coverage includes all MCP traffic or only calls that happened to reach the gateway. That answer requires discovery evidence.
An engineering trace can show that an agent completed its work. An IdP governance record must establish why it was entitled to do so.


