Add auth_handler_name parameter to Authorization.exchange_token call#55
Merged
pontemonti merged 2 commits intomainfrom Nov 18, 2025
Merged
Add auth_handler_name parameter to Authorization.exchange_token call#55pontemonti merged 2 commits intomainfrom
pontemonti merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
Utilityclass with methods for extracting app IDs from JWT tokens and resolving agent identities - Replaces
agentic_app_idparameter withauth_handler_namein 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 |
...soft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py
Show resolved
Hide resolved
libraries/microsoft-agents-a365-runtime/microsoft_agents_a365/runtime/utility.py
Show resolved
Hide resolved
libraries/microsoft-agents-a365-runtime/microsoft_agents_a365/runtime/utility.py
Show resolved
Hide resolved
rahuldevikar761
approved these changes
Nov 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.