fix(MCP): Fix ManagedServiceIdentity auth for MCP connections (v5.961)#9209
Conversation
…9205) Align Consumption connector with Standard for MCP connections: - Managed MCP path: build connectionProperties with MSI auth and user-assigned identity from WorkflowService().getAppIdentity() - Built-in MCP _buildMcpAuthentication: add WorkflowService fallback for identity when not in parameterValues - Remove debug console.log statements - Update tests with WorkflowService mock initialization
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | |
| Commit Type | ✅ | |
| Risk Level | Add a matching risk:medium label to align with the PR body |
|
| What & Why | ✅ | |
| Impact of Change | ✅ | |
| Test Plan | ✅ | |
| Contributors | Add contributors if applicable | |
| Screenshots/Videos | ✅ |
Overall: this PR passes review of the title/body template, with the only notable follow-up being the missing risk label.
Last updated: Tue, 26 May 2026 17:31:51 GMT
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | |
| Commit Type | ✅ | |
| Risk Level | ✅ | |
| What & Why | ✅ | |
| Impact of Change | ✅ | |
| Test Plan | ✅ | Mention the specific unit-test coverage if desired |
| Contributors | Optional; add only if you want to credit collaborators | |
| Screenshots/Videos | ✅ |
Overall: this PR passes. The body is compliant, the selected risk level matches the scope of the diff, and the unit test updates back the test-plan checkbox. The advised risk level remains medium, which matches the submitter's estimate.
Last updated: Fri, 22 May 2026 02:42:43 GMT
📊 Coverage CheckThe following changed files need attention:
Please add tests for the uncovered files before merging. |
There was a problem hiding this comment.
Pull request overview
Fixes Consumption-SKU MCP listMcpTools requests for Managed Service Identity (MSI) authentication by ensuring the user-assigned managed identity (UAMI) resource ID is included when required (aligning behavior with the Standard connector’s approach of deriving identity from WorkflowService().getAppIdentity()).
Changes:
- Consumption MCP
listMcpToolsrequest building now derives UAMI fromWorkflowService().getAppIdentity()and includes it in MSI authentication payloads. - Managed MCP connection path now adds
connectionProperties.authenticationin the request (previously only referenced{ connection: { id } }). - Consumption connector unit tests updated to initialize
WorkflowServiceto support the new identity-derivation behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| libs/logic-apps-shared/src/designer-client-services/lib/consumption/connector.ts | Adds workflow-identity-derived UAMI support for MSI in Consumption MCP listMcpTools payload construction. |
| libs/logic-apps-shared/src/designer-client-services/lib/consumption/tests/connector.spec.ts | Updates Consumption connector tests to initialize WorkflowService for MCP scenarios and validates managed MCP request shape. |
…nections - Update designer-v2 dynamicdata.ts to extract identity from connectionReference - Update designer-v2 queries/connector.ts to accept and pass identity parameter - Update ConnectorService interface to accept optional identity parameter - Update consumption/standard connector implementations to use passed identity for MCP connections - When identity is provided, use it instead of picking first identity from WorkflowService - This ensures user-selected managed identity is correctly threaded through all MCP calls
…ctor When no identity is explicitly threaded from the connection reference, fall back to WorkflowService().getAppIdentity() to resolve user-assigned identity. This preserves backward compatibility for callers that don't pass identity (e.g., designer-v1).
Commit Type
Risk Level
What & Why
Completes fix for #9205 — MCP connections using ManagedServiceIdentity auth in Consumption SKU. This PR adds identity threading to ensure the user-selected managed identity is correctly passed through all dynamic values requests.
Original Issue (#9205): Consumption MCP connections were missing the
identityfield in thelistMcpToolsAPI request, causing failures for user-assigned managed identity scenarios.This PR Adds: Identity threading through the dynamic values pipeline to ensure consistency with Standard SKU:
getListDynamicValuesextracts the selected identity fromconnectionReference.connectionProperties.authentication.identityqueries/connector.tsto theConnectorServicelayerWorkflowServiceImpact of Change
listMcpToolsand dynamic values requests, ensuring consistent tool discovery and parameters.identityparameter ingetListDynamicValuesTest Plan
Updated connector tests with
InitWorkflowServicemock for managed identity scenarios. All existing tests pass:connector.spec.ts: 68 tests pass (38 Consumption + 30 Standard)dynamicdata.spec.ts(designer-v2): 8 tests passdynamicdata.spec.ts(designer-v1): 8 tests passContributors
Screenshots/Videos
N/A — no visual changes.