Skip to content

Conversation

@rahuldevikar761
Copy link
Collaborator

No description provided.

@rahuldevikar761 rahuldevikar761 requested a review from a team as a code owner January 22, 2026 00:14
Copilot AI review requested due to automatic review settings January 22, 2026 00:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request refactors the authentication approach for non-agentic requests in the .NET Agent Framework sample. The changes remove the OBO (On-Behalf-Of) authentication handler ("me") and replace it with a bearer token-based approach for development and testing scenarios like Playground and WebChat.

Changes:

  • Removed "me" authentication handler configuration from appsettings.json
  • Simplified ToolingManifest.json to include only mcp_MailTools MCP server
  • Added TryGetBearerTokenForDevelopment method to support bearer token authentication from environment variables
  • Updated message handling logic to differentiate between agentic (uses auth handler) and non-agentic flows (uses bearer token)
  • Changed error handling to gracefully continue without MCP tools instead of throwing exceptions

Reviewed changes

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

File Description
dotnet/agent-framework/sample-agent/appsettings.json Removed "me" MsalUserAuthorization handler configuration to align with new bearer token approach
dotnet/agent-framework/sample-agent/ToolingManifest.json Reduced MCP servers from 7 to 1 (mcp_MailTools only), simplifying the sample configuration
dotnet/agent-framework/sample-agent/Agent/MyAgent.cs Added bearer token support via environment variables, refactored authentication flow to handle agentic vs non-agentic requests differently, and improved error handling for graceful degradation

@rahuldevikar761 rahuldevikar761 merged commit 2dd3783 into main Jan 23, 2026
7 checks passed
@rahuldevikar761 rahuldevikar761 deleted the users/radevika/fixAFSample branch January 23, 2026 01:27
@lsl-2020 lsl-2020 mentioned this pull request Jan 23, 2026
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