Skip to content

Refactor conditional logic for handling application endpoints in GraphMinimalPermissionsGuidancePlugin. Closes #1605#1606

Merged
garrytrinder merged 3 commits intodotnet:mainfrom
waldekmastykarz:fix/1605-app-permissions-missing-endpoints
Apr 9, 2026
Merged

Refactor conditional logic for handling application endpoints in GraphMinimalPermissionsGuidancePlugin. Closes #1605#1606
garrytrinder merged 3 commits intodotnet:mainfrom
waldekmastykarz:fix/1605-app-permissions-missing-endpoints

Conversation

@waldekmastykarz
Copy link
Copy Markdown
Collaborator

Refactor conditional logic for handling application endpoints in GraphMinimalPermissionsGuidancePlugin. Closes #1605

@waldekmastykarz waldekmastykarz requested a review from a team as a code owner March 28, 2026 09:41
Copilot AI review requested due to automatic review settings March 28, 2026 09:41
@waldekmastykarz waldekmastykarz added the pr-bugfix Fixes a bug label Mar 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors how GraphMinimalPermissionsGuidancePlugin collects application endpoints during recording playback so it evaluates minimal application permissions across all captured Graph requests (aligning with issue #1605’s “only evaluated GET /groups” symptom).

Changes:

  • Ensures application endpoints are always added to applicationEndpoints for each application-typed request.
  • Keeps the “roles to evaluate” capture behavior (set once from the first request that contains roles), while decoupling it from endpoint collection.

Copy link
Copy Markdown
Contributor

@garrytrinder garrytrinder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with 4 application-permission Graph requests (GET /groups, GET /groups/{id}/members, GET /teams/{id}, GET /groups/{id}/settings) using a JWT with roles claims. All endpoints correctly evaluated and minimal permissions computed. Fix confirmed.

@garrytrinder garrytrinder enabled auto-merge (squash) April 9, 2026 13:44
@garrytrinder garrytrinder merged commit 74d48ea into dotnet:main Apr 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: GraphMinimalPermissionsGuidancePlugin - Couldn't determine minimal permissions for the following URLs: - (No permissions found.)

3 participants