setup permissions custom uses User.Read token for OAuth2 grant operation
Maintainer thường phản hồi trong vòng 5 ngày
@ajmfehr đang làm issue này rồi.
Từ ngày 10/8/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Summary
a365 setup permissions custom attempts to create/read oauth2PermissionGrants with a Microsoft Graph token requested for only User.Read. The operation fails with Authorization_RequestDenied even when the signed-in user is a Global Administrator.
Environment
- Agent 365 CLI:
1.1.214+90c444832f - Windows / PowerShell
- Signed-in user: Global Administrator
Reproduction
a365 setup permissions custom `
--resource-app-id 90ecec28-f5a6-42b3-9bde-dae1ca98f8b5 `
--scopes "Computer.See,Computer.Control" `
--verbose
Actual behavior
The CLI successfully adds the resource to the blueprint's requiredResourceAccess, then fails while reading/creating the OAuth2 permission grant:
OAuth2 permission grant failed ... Authorization_RequestDenied:
Insufficient privileges to complete the operation.
Verbose logging shows the token provider explicitly requests and reuses a Graph token scoped only to User.Read:
Acquiring Graph token via token provider (... scopes: User.Read)
Reusing cached Graph token ... ::User.Read::...
Graph POST /v1.0/oauth2PermissionGrants ... failed 403 Forbidden
The CLI then reports that tenant admin action is required even though the user is a Global Administrator.
Expected behavior
The CLI should acquire a Graph token containing the permission required by the Graph operation—at minimum DelegatedPermissionGrant.ReadWrite.All—or drive the documented admin-consent handoff when its client app lacks that permission.
Microsoft Graph documents DelegatedPermissionGrant.ReadWrite.All as the least-privileged permission for POST /oauth2PermissionGrants:
https://learn.microsoft.com/graph/api/oauth2permissiongrant-post?view=graph-rest-1.0#permissions
Workaround / validation
Using an independently acquired Graph token containing DelegatedPermissionGrant.ReadWrite.All succeeds for the grant operation. The remaining blueprint inheritance entry can also be created directly through the official inheritablePermissions Graph API.
This issue is especially confusing because the user's directory role is sufficient, but both the directory role and the client token's Graph scopes are required.
- Ngôn ngữ chính
- C#
- Star
- 61
- Fork
- 35
- Merge trung bình
- 5 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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/Agent365-devTools
-
Two hardening notes from a blind pre-registered read at ea1579f: AgenticUserId skips ValidateGuid before an az shell-out; config secret has no file-mode hardening on macOS/LinuxCó thể làm lại được @ajmfehr đã nhận 37 ngày trước và không có pull request nào đang mở. Đang mởenhancement escalated feature P1 security
microsoft/Agent365-devTools#493 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 5 ngày
-
setup blueprint: identifierUris set to api://<appId> instead of api://botid-<appId>, breaking Teams message deliveryCó thể làm lại được @ajmfehr đã nhận 74 ngày trước và không có pull request nào đang mở. Đang mởbug escalated P1 security
microsoft/Agent365-devTools#482 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của microsoft/Agent365-devTools
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ClickHouse/clickhouse-cs#689 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 7 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
vchelaru/FlatRedBall2#1481 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-chat bug trivial
Độ 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 1 ngày
-
area-signalr
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
dotnet/aspnetcore#69842 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày