Skip to content

Add auth_handler_name parameter to Authorization.exchange_token call - #55

Merged
Johan Broberg (pontemonti) merged 2 commits into
mainfrom
users/johanb/AuthHandler
Nov 18, 2025
Merged

Add auth_handler_name parameter to Authorization.exchange_token call#55
Johan Broberg (pontemonti) merged 2 commits into
mainfrom
users/johanb/AuthHandler

Conversation

@pontemonti

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the MCP tool registration services by replacing the hard-coded agentic_app_id parameter with a more flexible auth_handler_name parameter, and introduces a new Utility class to dynamically resolve agent identities from tokens or context.

Key Changes:

  • Introduces a new Utility class with methods for extracting app IDs from JWT tokens and resolving agent identities
  • Replaces agentic_app_id parameter with auth_handler_name in all MCP tool registration services
  • Adds comprehensive unit tests for the new utility functions

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/runtime/test_utility.py New comprehensive test suite covering JWT token parsing and agent identity resolution
libraries/microsoft-agents-a365-tooling-extensions-semantickernel/microsoft_agents_a365/tooling/extensions/semantickernel/services/mcp_tool_registration_service.py Updated to use auth_handler_name parameter and dynamically resolve agent ID
libraries/microsoft-agents-a365-tooling-extensions-openai/microsoft_agents_a365/tooling/extensions/openai/mcp_tool_registration_service.py Updated to use auth_handler_name parameter and dynamically resolve agent ID
libraries/microsoft-agents-a365-tooling-extensions-azureaifoundry/microsoft_agents_a365/tooling/extensions/azureaifoundry/services/mcp_tool_registration_service.py Updated to use auth_handler_name parameter and dynamically resolve agent ID
libraries/microsoft-agents-a365-tooling-extensions-agentframework/microsoft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py Updated to use auth_handler_name parameter and dynamically resolve agent ID
libraries/microsoft-agents-a365-runtime/pyproject.toml Added PyJWT dependency for JWT token handling
libraries/microsoft-agents-a365-runtime/microsoft_agents_a365/runtime/utility.py New utility module providing JWT token parsing and agent identity resolution
libraries/microsoft-agents-a365-runtime/microsoft_agents_a365/runtime/__init__.py Updated exports to include the new Utility class

@pontemonti
Johan Broberg (pontemonti) merged commit 306c026 into main Nov 18, 2025
14 checks passed
@pontemonti
Johan Broberg (pontemonti) deleted the users/johanb/AuthHandler branch November 18, 2025 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants