Adding agentic auth for Agent Framework#10
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR modifies the add_tool_servers_to_agent method to enforce authorization requirements and add token exchange functionality. The changes make authentication mandatory and add automatic token exchange when an auth token is not provided.
- Makes
authandturn_contextrequired parameters instead of optional - Adds token exchange logic using
auth.exchange_token()whenauth_tokenis not provided - Imports utility functions
get_ppapi_token_scopeandget_use_environment_id
Comments suppressed due to low confidence (2)
libraries/microsoft-agents-a365-tooling-extensions-agentframework/microsoft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py:1
- The copyright header format is incorrect. According to Microsoft's standard format, it should be '# Copyright (c) Microsoft Corporation.' followed by '# Licensed under the MIT License.' on the next line.
# Copyright (c) Microsoft. All rights reserved.
libraries/microsoft-agents-a365-tooling-extensions-agentframework/microsoft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py:20
- Import of 'get_use_environment_id' is not used.
from microsoft_agents_a365.tooling.utils.utility import (
get_ppapi_token_scope,
get_use_environment_id,
)
...soft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py
Show resolved
Hide resolved
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@mrunalhirve128 I've opened a new pull request, #11, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
libraries/microsoft-agents-a365-tooling-extensions-agentframework/microsoft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py:1
- The copyright header is missing the MIT License line. It should include both the copyright and license information according to the project standards. The header should be:\n
python\n# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT License.\n
# Copyright (c) Microsoft. All rights reserved.
...soft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py
Show resolved
Hide resolved
…nto users/mrunalhirve/AFAgenticauth
...soft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py
Outdated
Show resolved
Hide resolved
…nto users/mrunalhirve/AFAgenticauth
Adding agentic auth for Agent Framework