setup permissions custom uses User.Read token for OAuth2 grant operation
メンテナーはふだん 5 日以内に返信
@ajmfehr がすでに取り組んでいます。
2026年8月10日 から。
評価
この issue はまだ評価されていません。
説明
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.
- 主要言語
- C#
- スター
- 61
- フォーク
- 35
- 平均マージ
- 5日 22時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/Agent365-devTools のほかの issue
-
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/Linux再び着手できるかも @ajmfehr が 35 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement escalated feature P1 security
microsoft/Agent365-devTools#493 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 5 日以内に返信
-
setup blueprint: identifierUris set to api://<appId> instead of api://botid-<appId>, breaking Teams message delivery再び着手できるかも @ajmfehr が 72 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug escalated P1 security
microsoft/Agent365-devTools#482 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 5 日以内に返信
microsoft/Agent365-devTools の issue をすべて見る
似ている issue
-
needs-area-label
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Fallout-build/Fallout#708 ·
メンテナーはふだん 5 日以内に返信
-
bug next version
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Rem0o/FanControl.Releases#4220 · コメント 1 件 ·
-
area:repo audit:approved audit:auto priority:P3
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
elsa-workflows/elsa-core#8771 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nkdAgility/azure-devops-migration-tools#3217 ·
メンテナーはふだん 1 日以内に返信