Skip to content

FIX Use Microsoft Graph for GUI authentication and group authorization - #2281

Merged
behnam-o merged 10 commits into
microsoft:mainfrom
behnam-o:copyrit-auth
Jul 31, 2026
Merged

FIX Use Microsoft Graph for GUI authentication and group authorization#2281
behnam-o merged 10 commits into
microsoft:mainfrom
behnam-o:copyrit-auth

Conversation

@behnam-o

@behnam-o behnam-o commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The GUI previously requested a custom API token that the backend could validate locally, but that token could not be used to query Microsoft Graph for group membership.

This change:

  • Requests a delegated Microsoft Graph token with User.Read
  • Authenticates users through Graph /me
  • Resolves authorization groups through /me/getMemberObjects
  • Requires configured allowed groups when authentication is enabled
  • Adds a short-lived, bounded cache to reduce Graph traffic
  • Updates deployment configuration, documentation, and tests

Graph tokens are treated as opaque by the backend. Authentication and group authorization failures are handled through a typed internal exception and converted to HTTP responses at the middleware boundary.

  • it also fixes the auth flow on the frontend and prevents duplicate MSAL initialization and redirect handling

@behnam-o
behnam-o marked this pull request as draft July 28, 2026 15:58
@behnam-o
behnam-o marked this pull request as ready for review July 28, 2026 17:41
@hannahwestra25 hannahwestra25 self-assigned this Jul 29, 2026
Comment thread infra/main.bicep Outdated
Comment thread infra/DEPLOY_NEW_INSTANCE.md Outdated
Comment thread infra/README.md Outdated
Comment thread infra/deploy_instance.py Outdated
Comment thread infra/README.md Outdated
Comment thread frontend/src/auth/AuthProvider.test.tsx Outdated
Comment thread frontend/src/auth/AuthProvider.test.tsx
@behnam-o
behnam-o added this pull request to the merge queue Jul 31, 2026
Merged via the queue into microsoft:main with commit f280151 Jul 31, 2026
54 checks passed
@behnam-o
behnam-o deleted the copyrit-auth branch July 31, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants