Skip to content

When an AI agent or MCP client can’t reach an MCP server, the failure can originate in the MCP Authorization Server: The Aembit component that provides OAuth 2.1 authorization for Model Context Protocol (MCP) servers, enabling secure access control for AI agents and MCP clients.Learn more or in the MCP Identity Gateway: A component that brokers MCP traffic between MCP clients and target MCP servers, validating authorization and presenting Aembit-managed credentials on each request.Learn more.

Use this guide to:

  • Investigate failures across the Aembit reporting surfaces
  • Look up specific failure modes and resolutions
  • Monitor proactively for new failures

The following reporting surfaces in the Aembit Tenant: Aembit Tenants serve as isolated, dedicated environments within Aembit that provide complete separation of administrative domains and security configurations.Learn more cover MCP and AI IAM activity. Consult them in this order:

Start with MCP Access Exceptions to see which MCP requests through the MCP Identity Gateway had an error or an exception, and with which exception code. A failure that repeats shows as one row with a count.

  1. In your Aembit Tenant, click Reporting, then select Reporting ☰ MCP Access Exceptions.
  2. Set Timespan to a period that covers the failure.
  3. If you know which user reported the failure, set User.
  4. Hover over the value in Exception Code to see its message.

If MCP Access Exceptions shows no row for the failure, check MCP Access Activities. A request listed there went through MCP Identity Gateway with no error or exception code.

  1. In your Aembit Tenant, click Reporting, then select Reporting ☰ MCP Access Activities.
  2. Set Timespan to a period that covers the failure.
  3. If you know which user reported the failure, set User.

Use Access Authorization Event: A structured record that Aembit Cloud emits when an Edge Component requests access to a Server Workload.Learn more to confirm whether the request reached Aembit Cloud: Aembit Cloud serves as both the central control plane and management plane, making authorization decisions, evaluating policies, coordinating credential issuance, and providing administrative interfaces for configuration.Learn more and how Access Policy: Access Policies define, enforce, and audit access between Client and Server Workloads by cryptographically verifying workload identity and contextual factors rather than relying on static secrets.Learn more evaluation resolved.

  1. In the Aembit Tenant, click Reporting. The Access Authorization Events tab opens by default.
  2. Set Timespan to a range that covers the failure.
  3. Set Severity to Error.
  4. View the event type. It tells you which stage of authorization failed and what to check first. See the Error condition matrix for specific resolutions.

Use Workload Event: A structured audit record that Aembit generates when application-level traffic flows through Agent Proxy or MCP Identity Gateway.Learn more when Access Authorization Events show a successful authorization but the MCP client still received an error. See what the MCP Identity Gateway forwarded, modified, or rejected.

  1. Open Workload Events and filter by the same timespan and Application Protocol = MCP.
  2. If you know which user reported the failure, apply the User (MCP App Protocol only) filter. MCP Workload Events record user identity as application.mcp.userId for flows that involve a human identity.
  3. Narrow by matched Client Workload: Client Workloads represent AI agents, software applications, scripts, or automated processes that initiate access requests to Server Workloads. They can act on behalf of a user under blended identity or operate autonomously, as when one service calls another.Learn more, Server Workload: Server Workloads represent target services, APIs, databases, or applications that receive and respond to access requests from Client Workloads.Learn more, or mcpSessionId to isolate a specific session.
  4. Look for mcp.response events where outcome.result is Error. The outcome.reason field describes the failure source.

Use MCP Authorization Tracing: A live view in the Aembit Tenant that surfaces each inbound authorization request as MCP Identity Gateway receives it, including the redirect URI, resource, matched Client Workload, and Access Policy outcome.Learn more when the static event record is ambiguous and you can reproduce the failure on demand.

  1. Ask the user to retry the failing operation.
  2. Watch MCP Authorization Tracing for the resource URL, redirect URI, and Access Policy match outcome.

The following matrix maps MCP failure modes to the event that surfaces them and how to remediate.

FailureWhere it surfacesWhat you’ll seeResolution
Client registration failureaccess.registration event, severity ErrorDynamic Client Registration (DCR) rejected the request, and the MCP client receives invalid_redirect_uri or invalid_client_metadata. The clientWorkload.reason names the check that failed, such as NoMatchingClientWorkload for the redirect URI or MissingGrantTypes. A server_error response means Aembit Cloud hit an internal error instead.Fix the registration request or the Client Workload that clientWorkload.reason points to; retrying the same request fails the same way. See Client registration failures. For server_error, contact Aembit support if the error repeats.
Client Workload redirect URI mismatchaccess.authorization event, severity Info. A client that registers through DCR hits this earlier, as an access.registration event with reason NoMatchingClientWorkload.outcome.result is Unauthorized and clientWorkload.reason is NoClientWorkload: the redirect URI in the request doesn’t match any registered Client Workload.Verify the redirect URI on the Client Workload matches the MCP client’s callback URL exactly. See Redirect URI mismatch.
Server Workload mismatchaccess.authorization event, severity Infooutcome.result is Unauthorized and serverWorkload.reason is NoServerWorkload: the resource URL in the request doesn’t match any registered Server Workload.Verify the resource URL on the Server Workload matches the MCP server URL the client is trying to reach.
Trust Provider: Trust Providers verify identity claims from a workload's runtime environment or an Identity Provider instead of relying on pre-shared secrets. They support workload attestation and user identity validation for blended identity.Learn more attestation failureaccess.authorization event, severity ErrorTrust Provider result is Unauthorized with a reason such as MatchRuleFailed or InvalidSignature.Confirm the identity token’s claims match the Trust Provider match rules. See Authorization failure.
Credential Provider: Credential Providers obtain the specific access credentials—such as API keys, OAuth tokens, or temporary cloud credentials—that Client Workloads need to authenticate to Server Workloads.Learn more failureaccess.credential event, severity ErrorCredential Provider result isn’t Retrieved. Common reasons include Token expired and upstream identity-provider errors.The expired-credential explanation in the event now describes which token expired and at which step. Re-authenticate the user or refresh the credential.
Enterprise-managed token exchange failureaccess.credential event, severity ErrorCredential Provider result is Error and reason is generic. The event doesn’t say which of the two token requests failed.Work through Enterprise-managed token exchange failures.
No matching Client Workloadaccess.discovery event, severity ErrorDiscovery enumerates the Client Workloads considered for the Gateway-to-Server Access Policy and indicates that none matched. When a Client Workload matched some of its identifiers but not all, the entry’s reason, attribute, expectedValue, and actualValue name the identifier that failed.Verify the Client Workload identifying the Gateway is present in the Gateway-to-Server Access Policy.
No matching Server Workloadaccess.discovery event, severity ErrorDiscovery enumerates the Server Workloads considered and indicates that none matched the target MCP server. The entry’s reason says no Server Workload matched.Verify the Server Workload for the target MCP server exists and the Gateway-to-Server Access Policy includes it.
No active Access Policyaccess.discovery event, severity ErrorDiscovery identifies the Client Workload, but the accessPolicies entry’s reason says no Access Policy matched.Verify an active Gateway-to-Server Access Policy includes the Client Workload identifying the Gateway.
Access Policy match fails during MCP authorizationaccess.authorization event, severity InfoThe MCP client shows Aembit Access Policy validation failed, followed by the event ID when Aembit recorded one. The reason on the failed entry names the match that failed.Look up the event ID in Access Authorization Events and fix the match the reason names. Exactly one active Access Policy must connect the Client Workload and Server Workload.
Trust Provider attestation failureaccess.authorization event, severity ErrorSame shape as the Client-to-Gateway Access Policy Trust Provider failure, but with the Gateway-to-Server Access Policy context.Confirm the Aembit-issued JWT presented by the Gateway is valid for the target MCP server.
Wrong-audience JWT presented to the Gatewaymcp.response Workload Event, severity ErrorGateway rejects the request because the access token’s aud claim doesn’t match the Gateway URL.Reissue the access token with the correct audience. Check the Client Workload’s resource configuration.
No assigned MCP serversmcp.response Workload Event, severity ErrorThe Gateway received a request but has no Server Workloads assigned in the matched Gateway-to-Server Access Policy.Add the target Server Workload to the Gateway-to-Server Access Policy.
MCP server unreachablemcp.response Workload Event, severity ErrorThe Gateway couldn’t connect to the upstream MCP server. The reason describes the network or TLS failure.Verify the Gateway can reach the MCP server over the network and confirm any required TLS configuration.
Non-2xx response from the MCP servermcp.response Workload Event, severity ErrorThe MCP server returned a non-2xx HTTP status code. The reason includes the status code and any upstream error detail.Investigate the MCP server logs for the cause of the upstream error.
tools/call failuremcp.response Workload Event, severity ErrorThe Gateway forwarded the tool invocation, and the MCP server returned a tool-call error.Inspect the upstream MCP server response. The Gateway records the failure with Error severity so SIEM alerting can trigger on it.

Enterprise-managed token exchange failures

Section titled “Enterprise-managed token exchange failures”

The MCP Enterprise Managed Access Token Credential Provider follows Enterprise-Managed Authorization: An MCP authorization flow in which the corporate identity provider decides which users and AI agents can reach an MCP server, and a trusted party exchanges the user's single sign-on identity for an MCP server access token without a per-user consent prompt.Learn more and obtains a token in two requests. The first is an identity assertion request to the corporate identity provider. The second is an access token request to the MCP server’s authorization server. When either request fails, the access.credential event records result Error with a generic reason, so the following checklist is the diagnostic path.

  • The offline_access scope is missing. The OIDC Identity Provider’s Identity Provider Scopes field must include offline_access, or Aembit receives no refresh token for the user.
  • The user hasn’t signed in since you added the scope. Aembit captures the refresh token at sign-in. The user signs out of Aembit and signs in again through the Identity Provider.
  • The identity provider refused the identity assertion request. Check the application’s grant types, its Cross-app access settings, and the AI agent’s Resource Connection in the identity provider. Prepare the Identity Provider for enterprise-managed access describes each.
  • The MCP server’s authorization server refused the access token request. Confirm the Credential Provider’s OIDC Issuer URL matches the issuer the identity provider trusts for the server. Also confirm that the Client ID is the one the server issued for Aembit.
  • The MCP server’s endpoints changed after Discover ran. Endpoints are static after Discover. Open the Credential Provider, click Discover again, and save.

After you fix the cause, the user sends a new request through the MCP Identity Gateway and the next access.credential event shows result Retrieved.

To match Access Authorization Events with Workload Events for the same activity, use these shared IDs:

  • Context ID to match Access Authorization Events from the same evaluation.
  • Connection ID to match Workload Events on the same connection.
  • Correlation ID to match the Workload Events of one MCP request, across every MCP server it reaches.
  • MCP Session ID to match Workload Events across multiple connections in the same MCP session.
  • Authorization chain to follow a request across both surfaces, back to the authorization decisions behind it.
IdentifierWhere it appearsWhat it identifies
Event IDAll events (meta.eventId)A single event record. Unique per event. Useful when sharing a specific event with Aembit support.
Context IDAccess Authorization Events (meta.contextId)An authorization evaluation context. The access.request and access.authorization events for the same evaluation share a Context ID.
Authorization chainWorkload Events, and access.request and access.authorization events from Aembit Edge: Aembit Edge represents components deployed within your operational environments that enforce Access Policies by intercepting traffic, verifying identities, and injecting credentials just-in-time.Learn more policy requests (authorizationChain)An ordered list of the Context IDs for the authorization decisions behind a request. The only identifier that spans both surfaces. To pivot from one surface to the other, filter Access Authorization Events by any Context ID in the chain. Workload Events carry it from MCP Identity Gateway 1.32 and Agent Proxy 1.34.5755 on.
Connection IDWorkload Events (meta.connectionId)A single TCP or HTTP connection through Agent Proxy or the MCP Identity Gateway. All request and response events for the same connection share a Connection ID.
Correlation IDMCP Workload Events (meta.correlationId)A single MCP request from an MCP client. Every Workload Event the MCP Identity Gateway records for the request shares a Correlation ID, including the events for each MCP server the request reaches.
MCP Session IDWorkload Events (application.mcp.mcpSessionId)The MCP protocol session between an MCP client and the Gateway. Shared across requests and responses in the same session. Useful when an MCP client reconnects mid-session.
User identityMCP Workload Events (application.mcp.userId)The user identity associated with the event for MCP flows that involve a human identity, such as MCP Authorization Server flows. Use this with the User (MCP App Protocol only) filter to scope investigation to a single user.

Trace a request with the authorization chain

Section titled “Trace a request with the authorization chain”

When you investigate an MCP request, you need to understand which authorization decisions allowed the request, and what happened at each step. The authorization chain connects those events across both the access and workload surfaces.

An authorizationChain is an ordered list of the Context IDs for the authorization decisions behind the request. These events carry it:

  • The access.request and access.authorization events from Aembit Edge policy requests.
  • Workload Events from MCP Identity Gateway 1.32 and later, and from Agent Proxy 1.34.5755 and later.

MCP Authorization Server /authorize events and the events from credential retrieval don’t carry a chain. Their Context IDs still appear in the chains of the events that follow them. Each authorization decision adds its own Context ID to the chain, so the chain grows as the request moves through the flow. A workload event carries the chain as it stood when Aembit recorded the event.

The Client-to-Gateway workload event’s chain holds the Context IDs of the authorization events from access token issuance. The Gateway-to-Server workload event extends that chain with the directive and credential decisions.

To trace a request end-to-end:

  1. Open the event you’re investigating and copy any Context ID from its authorizationChain.
  2. In Access Authorization Events, filter by Context ID using that value.
  3. Review the matching access.request, access.authorization, and access.credential events to see the Access Policy evaluation, the Trust Provider and Access Condition: Access Conditions add dynamic, context-aware constraints to authorization by evaluating circumstances like time, location, or security posture to determine whether to grant access.Learn more results, and the credential retrieval behind the request.

A request such as tools/list fans out to every assigned MCP server, and the Gateway runs a separate authorization for each upstream server. Each branch carries its own chain. The chains share the opening Context IDs from the Client-to-Gateway request (auth-code issuance and token exchange), then extend differently for each server.

EventChain (authorizationChain)
mcp.request (Client-to-Gateway)[11111111-…, 22222222-…]
mcp.request to Server A (Gateway-to-Server)[11111111-…, 22222222-…, aaaa0001-…, aaaa0002-…]
mcp.request to Server B (Gateway-to-Server)[11111111-…, 22222222-…, bbbb0001-…, bbbb0002-…]
mcp.request for Server A (fanout)[11111111-…, 22222222-…]
mcp.request for Server B (fanout)[11111111-…, 22222222-…]
mcp.response (Client-to-Gateway)[11111111-…, 22222222-…]

The Client-to-Gateway mcp.response carries only the shared opening Context IDs, not the per-branch entries, so you can trace each branch on its own. To investigate one server, take a Context ID from that branch’s chain and filter Access Authorization Events on it. For example, filtering on aaaa0001-… returns the access.* events for the connection to Server A.

The MCP Identity Gateway emits the Client-to-Gateway mcp.request and mcp.response events for every request that passes access token validation.

On tools/list, resources/list, and prompts/list, the Gateway also emits a fanout mcp.request event for each server, and an mcp.response event for each server that fails or times out. These are separate from the Gateway-to-Server events in the table. They name the server’s Server Workload in workload.server.id and workload.server.name. Their authorizationChain holds only the shared opening Context IDs, so use workload.server.id to tell the servers apart. To find a server’s Access Authorization Events, take a Context ID from that server’s Gateway-to-Server event. When known, the mcp.response event also records the MCP server’s host in network.serverWorkloadHost and the HTTP status the MCP server returned in application.mcp.httpResponseCode. When the server didn’t respond within the list timeout, application.mcp.httpResponseCode is 504.

If an event has no authorizationChain, one of these applies:

  • The event type doesn’t carry a chain, such as MCP Authorization Server /authorize events and the events from credential retrieval.
  • The event came from an MCP Identity Gateway version earlier than 1.32 or an Agent Proxy version earlier than 1.34.5755.
  • The chain exceeded its limit of 100 Context IDs, and Aembit Edge dropped it to keep request headers small.

Aembit still records the events; correlate them using the other identifiers in the preceding table.

Once you know what MCP and AI IAM failures look like, you can monitor for them proactively instead of waiting for a user to report a problem. Forward Aembit events to any destination you already operate—a SIEM, an S3 bucket, or another log store—using Log Streams.

  • Any Access Authorization Event with severity Error. This includes Trust Provider failures, Credential Provider failures, and access.discovery events that found no match.
  • Any Workload Event with severity Error and event type mcp.response. This catches Gateway-side rejections, upstream MCP server failures, and tool-call failures.
  • Info - Normal authorization or traffic event. No action required.
  • Warning - Reserved for non-failure conditions that still merit review.
  • Error - A real failure. Trust Provider attestation failures and tool-call failures now emit at Error severity in MCP flows, so you can use Error as a reliable alerting threshold.

On the single-server path, the MCP Identity Gateway emits two events per request. Fanout requests such as tools/list emit more events, and the count grows with the number of MCP servers the request fans out to. On tools/list, resources/list, and prompts/list, these include an mcp.request event for each of those MCP servers, and an mcp.response event for each one that fails or times out. A server the Gateway skips because it doesn’t support the method still gets its mcp.request event. Plan retention and alerting thresholds accordingly.