Manage end-user OAuth consent for AI agents with Amazon Bedrock AgentCore Amazon Web Services added a Consent portal to AgentCore Identity, a capability of Amazon Bedrock AgentCore, giving customers a managed web experience and session binding endpoint for the AgentCore Gateway three-legged OAuth (3LO) flow. Previously, customers had to build and host their own session binding infrastructure, including presenting the authorization URL, hosting a public HTTPS callback, authenticating the returning user, managing browser sessions, and calling CompleteResourceTokenAuth; the portal now handles browser redirects and session binding while AgentCore Identity stores resulting tokens in its token vault. The capability targets agents accessed through IDE and Model Context Protocol (MCP) clients such as Kiro, Claude Code, Cursor, and Visual Studio Code, letting users grant consent before invoking a tool so subsequent tool calls reuse the stored token. Artificial Intelligence https://aws.amazon.com/blogs/machine-learning/ Manage end-user OAuth consent for AI agents with Amazon Bedrock AgentCore AI agents often need to access services such as GitHub and Slack on a user’s behalf. Before an agent can act, the user must authenticate with the provider and explicitly approve the requested access. The application must then securely associate the resulting OAuth grant with the user who authorized it. This process is called session binding. Previously, customers using the AgentCore Identity a capability of Amazon Bedrock AgentCore three-legged OAuth 3LO flow also known as OAuth 2.0 authorization code flow had to build and host their own session binding infrastructure. This included presenting the authorization URL, hosting a public HTTPS callback, authenticating the returning user, managing browser sessions, and calling CompleteResourceTokenAuth to complete the flow. AgentCore Identity now offers a Consent portal, a managed web experience and session binding endpoint for AgentCore Gateway, a capability of Amazon Bedrock AgentCore. You create a portal for a gateway and share its URL with your users. Users authenticate with your organization’s identity provider IdP , review the services available to the agent, and grant consent to individual providers. The portal handles the browser redirects and session binding, while AgentCore Identity stores the resulting tokens in its token vault. This capability is particularly useful for agents accessed through IDE and Model Context Protocol MCP clients such as Kiro, Claude Code, Cursor, and Visual Studio Code. Users can grant consent before invoking a tool, and subsequent tool calls can use the token already stored for that user. In this post, we use a software development assistant as an example. We walk through the administrator and end-user experiences on the AWS Management Console and browser, and show how to review the resulting activity in AWS CloudTrail. Example scenario: Give a development assistant access to GitHub Consider a company named Example Corp that provides its developers with an AI coding assistant through an AgentCore Gateway. The assistant has two targets: - A GitHub target that can list repositories and create issues. - A Slack target that can list public channels and post messages. Example Corp uses its corporate IdP to authenticate employees. The administrator wants each GitHub and Slack OAuth grant to remain associated with the employee who approved it. Developers can connect either provider independently and return to their IDE without repeated prompts. The walkthrough follows these two roles: - Administrator: Configures the corporate IdP, GitHub and Slack gateway targets, execution role, and Consent portal, and then sends the portal URL to developers. - End user: Opens the URL, signs in with the corporate IdP, connects GitHub when needed, and can grant Slack access separately. Prerequisites Before starting the walkthrough, Example Corp needs: - An AWS account with access to Amazon Bedrock AgentCore https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-get-started-cli.html . - An AgentCore Gateway https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-quick-start.html configured with JWT inbound authorization https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-inbound-auth.html . - An IDE or MCP client configured to connect to the same AgentCore Gateway that will be attached to the Consent portal. - Administrative access to the corporate IdP. - A registered GitHub OAuth App https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app and Slack app https://docs.slack.dev/authentication/installing-with-oauth/ for a development or test workspace. - Permission to register the AgentCore Identity callback URL in each provider application. Getting started The following steps show what the Example Corp administrator configures and what a developer experiences after receiving the portal URL. Steps for administrator The administrator completes Steps 1–6 to configure the identity provider, gateway targets, execution role, and Consent portal. Step 1: Prepare the corporate IdP and gateway connections Administrator IAM policy Attach this policy to the administrator identity that performs Steps 1–3. Replace the account ID. The AWS Identity and Access Management IAM statement covers the Create default role option on the console, which creates a service role named AmazonBedrockAgentCoreConsentPortalDefaultServiceRole-