Skip to content

Exclude Obo roots when building in trim mode given the AOT violations in Obo apis#993

Closed
anuchandy wants to merge 4 commits intomicrosoft:feature/2.0beta-remotefrom
anuchandy:exclude-obo-for-trim-build
Closed

Exclude Obo roots when building in trim mode given the AOT violations in Obo apis#993
anuchandy wants to merge 4 commits intomicrosoft:feature/2.0beta-remotefrom
anuchandy:exclude-obo-for-trim-build

Conversation

@anuchandy
Copy link
Copy Markdown
Member

What does this PR do?

The Azure MCP Server is distributed as a fully trimmed, self-contained executable. The ongoing work for On-Behalf-Of (OBO) authentication currently leverages the Microsoft.Identity.Web package, whose OBO implementation relies on non–AOT-compatible APIs - specifically ConfigurationBinder.Bind, which is marked with RequiresUnreferencedCodeAttribute. The issue is being tracked here: AzureAD/microsoft-identity-web#3576.

To unblock the CI pipeline, this PR temporarily excludes the OBO code path when building in Trimmed mode. In other words, running below command (that CI uses) produces a single-file trimmed executable without the OBO APIs.

./eng/scripts/Build-Code.ps1 -SelfContained -Trimmed -SingleFile -Server "Azure.Mcp.Server"

For local development and testing, developers can still build a non-trimmed version of azmcp that includes OBO support by running:

./eng/scripts/Build-Code.ps1 -SelfContained -SingleFile -Server "Azure.Mcp.Server"

GitHub issue number?

[Link to the GitHub issue this PR addresses]

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • Run .\eng\scripts\Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

@anuchandy anuchandy requested review from a team as code owners October 28, 2025 18:34
@anuchandy anuchandy requested review from KarishmaGhiya, alzimmermsft, g2vinay, joshfree, sandeep-sen, vukelich and xiangyan99 and removed request for a team October 28, 2025 18:34
@anuchandy anuchandy marked this pull request as draft October 28, 2025 18:59
@joshfree joshfree moved this from Untriaged to In Progress in Azure MCP Server Oct 29, 2025
@joshfree joshfree added this to the 2025-11 milestone Oct 29, 2025
@anuchandy anuchandy force-pushed the exclude-obo-for-trim-build branch from 0387678 to d0fd719 Compare October 29, 2025 20:15
@anuchandy
Copy link
Copy Markdown
Member Author

closing this given we're going to include remote in untrimmed build for docker, and for all other distributions it is trimmed, which is addressed in #1008

@anuchandy anuchandy closed this Oct 30, 2025
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants