Azure MCP Server: policy_assignment_list fails at management-group scope ("Only resource in a subscription is supported") - still reproducible in 3.0.0-beta.49
Maintainer thường phản hồi trong vòng 2 ngày
@msalaman đang làm issue này rồi.
Từ ngày 15/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Title: Azure MCP Server: policy_assignment_list fails at management-group scope ("Only resource in a subscription is supported") — still reproducible in 3.0.0-beta.49
Summary
policy_assignment_list fails when the target scope is an Azure management group. Subscription-level enumeration works fine; management-group-level enumeration fails with:
Only resource in a subscription is supported
This is still reproducible in 3.0.0-beta.49, despite a related support case being closed/archived as if resolved.
Root cause
Azure.Mcp.Tools.Policy.Services.PolicyService.ListPolicyAssignmentsAsync resolves any non-empty scope via:
armClient.GetGenericResource(new ResourceIdentifier(scope)).GetAsync()
then calls .GetPolicyAssignments() on the result.
A management-group scope (/providers/Microsoft.Management/managementGroups/{id}) is not a generic ARM resource reachable through that GET surface — it's owned by Microsoft.Management, not subscription/resource-group scoped — so the generic-resource GET throws before policy assignments can even be listed.
Repro steps
- Call
policy_assignment_listwithscope= a subscription ID → succeeds. - Call
policy_assignment_listwithscope= a management group ID (/providers/Microsoft.Management/managementGroups/{mgId}) → fails with "Only resource in a subscription is supported." - Confirmed on both
2.0.5and3.0.0-beta.49. subscription_listandgroup_list(management group list) both work correctly — only policy-assignment enumeration at MG scope is affected.- Native Azure Policy REST API / Azure Resource Graph (
PolicyResourcestable) correctly enumerate policy assignments at management-group scope — confirming this is an Azure MCP Server defect, not an ARM/Policy service limitation.
Expected behavior
policy_assignment_list should enumerate policy assignments at management-group scope, matching native Azure Policy REST API behavior.
Suggested fix
Bypass the generic-resource GET for management-group scopes. Use the scope-based extension method armClient.GetPolicyAssignments(new ResourceIdentifier(scope)) (from Azure.ResourceManager.Resources), or route management-group scopes through the typed ManagementGroupResource.GetPolicyAssignments() path, rather than funneling every scope through GetGenericResource.
Impact
Blocking a customer's Foundry-based Azure Policy governance agent — specifically the management-group portion of policy discovery, inheritance analysis, policy rationalization, and compliance workflows. Customer requests:
- GitHub issue / tracking ID for the defect (this issue)
- Planned fix version
- Estimated timeline / release window
- Whether a preview build containing the fix can be provided for validation
- Any supported interim workaround within Azure MCP itself
Interim workaround (customer-facing, until fixed)
- Subscription-level
policy_assignment_listis unaffected and works today. - For management-group-level enumeration, use Azure Resource Graph (
PolicyResourcestable, scoped to the management group) or the raw Azure Policy REST API directly.
Environment
- Azure MCP Server versions tested:
2.0.5,3.0.0-beta.49 - Related support case: TrackingID#2608260040008728 (archived/closed prematurely — defect persists)
- Ngôn ngữ chính
- C#
- Star
- 3.9k
- Fork
- 689
- Merge trung bình
- 2 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 143
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/mcp
-
[BUG] speech tts synthesize rejects valid locales such as fil-PH, yue-CN and sr-Latn-RS in --languageCó thể đã có người làm @Shizoqua đã nhận hôm nay. Đang mởAzure.Mcp.Server needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[BUG] deploy architecture diagram generate never shows Docker settings for container appsCó thể đã có người làm @Shizoqua đã nhận hôm nay. Đang mởAzure.Mcp.Server needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[BUG] Single mode: an unknown tool name fails with "An error occurred invoking 'azure'" instead of listing the available toolsCó thể đã có người làm @Ahmed-Manai đã nhận 9 ngày trước. Đang mởserver-Azure.Mcp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[BUG] pricing get drops tierMinimumUnits, so tiered meters return same-meter prices with no thresholdCó thể đã có người làm @msalaman đã nhận 29 ngày trước. Đang mởcustomer-reported needs-team-triage question server-Azure.Mcp tools-Price tools-Pricing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/mcp#4087 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Doc Gap] README.md still shows removed "Basic" resilience usage plan tier after GA SDK updateCó thể làm lại được @anishsinghhh3-bit đã nhận 32 ngày trước và không có pull request nào đang mở. Đang mởcopilot documentation server-Azure.Mcp tools-ResilienceManagement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
microsoft/mcp#4008 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/mcp
Issue tương tự
-
fix: [v5] FluentTextInput throws from ElementInternals during .NET 11 enhanced form navigationĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
microsoft/fluentui-blazor#5721 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Project dependencies are outdatedCó thể đã có người làm @yasmoradi đã nhận hôm nay. Đang mởdependencies
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
bitfoundation/bitplatform#15616 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
:watch: Not Triaged Pri3
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area-controls-shell platform/android
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
dotnet/maui#41304 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày