# ServiceNow on-behalf-of token exchange with Bedrock AgentCore Gateway

DevFeed: [ServiceNow on-behalf-of token exchange with Bedrock AgentCore Gateway](<https://devfeed.tech/articles/servicenow-on-behalf-of-token-exchange-with-bedrock-agentcore-gateway-115501.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/machine-learning/servicenow-on-behalf-of-token-exchange-with-bedrock-agentcore-gateway/>)

Author: Greg Biegel

Published: 2026-11-03T16:47:40Z

Content type: tutorial

Language: en

Sources: [Artificial Intelligence](<https://devfeed.tech/sources/artificial-intelligence.md>)

Topics: [Amazon Bedrock AgentCore](<https://devfeed.tech/topics/amazon-bedrock-agentcore.md>), [REST API](<https://devfeed.tech/topics/rest-api.md>), [JSON Web Tokens](<https://devfeed.tech/topics/jwt.md>), [AI Bots](<https://devfeed.tech/topics/ai-bots.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [advanced-300](<https://devfeed.tech/tags/advanced-300.md>), [agent](<https://devfeed.tech/tags/agent.md>), [agentcore](<https://devfeed.tech/tags/agentcore.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [amazon-bedrock](<https://devfeed.tech/tags/amazon-bedrock.md>), [amazon-bedrock-agentcore](<https://devfeed.tech/tags/amazon-bedrock-agentcore.md>), [api](<https://devfeed.tech/tags/api.md>), [bedrock](<https://devfeed.tech/tags/bedrock.md>), [bedrock-agentcore](<https://devfeed.tech/tags/bedrock-agentcore.md>), [code](<https://devfeed.tech/tags/code.md>), [configure](<https://devfeed.tech/tags/configure.md>), [entra-id](<https://devfeed.tech/tags/entra-id.md>), [gateway](<https://devfeed.tech/tags/gateway.md>), [microsoft-entra-id](<https://devfeed.tech/tags/microsoft-entra-id.md>), [rest-api](<https://devfeed.tech/tags/rest-api.md>), [servicenow](<https://devfeed.tech/tags/servicenow.md>), [technical-how-to](<https://devfeed.tech/tags/technical-how-to.md>), [token](<https://devfeed.tech/tags/token.md>), [token-exchange](<https://devfeed.tech/tags/token-exchange.md>), [user](<https://devfeed.tech/tags/user.md>)

## AI overview

Amazon Bedrock AgentCore Gateway can exchange an agent's Microsoft Entra ID token for a ServiceNow API token while preserving the calling user's identity, so ServiceNow can apply that user's permissions. Configure Entra app registrations for the agent and API connector, set up ServiceNow's inbound OAuth integration and OIDC claim mapping, then create an AgentCore outbound OAuth configuration using JWT authorization grant. Native OBO requires a gateway created with MCP version 2025-11-25; on its ServiceNow target, select Token exchange grant, request the API connector's `user_impersonation` scope, and set `requested_token_use:on_behalf_of`. The gateway performs the exchange per request without an interceptor Lambda or custom exchange code. Troubleshooting focuses on matching `preferred_username` to a ServiceNow user, allowing the needed API scope, and granting the agent app API permissions.

## Source excerpt

Learn how to configure Amazon Bedrock AgentCore Gateway for an on-behalf-of (OBO) token exchange with Microsoft Entra ID, so an AI agent can call the ServiceNow REST API while preserving the calling user's identity. AgentCore Gateway performs the exchange natively, with no interceptor Lambda or custom code.