Repository navigation
feat(den): add Microsoft 365 permission parity - #2700
Merged
benjaminshafii merged 7 commits intoJul 13, 2026
Merged
benjaminshafii merged 7 commits into
benjaminshafii merged 7 commits into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
@reachjalil is attempting to deploy a commit to the Different AI Team on Vercel. A member of the Team first needs to authorize it. |
* feat(mcp): add enterprise mock foundation artifacts * chore(mcp): wire enterprise mock workspaces * ci(mcp): enforce enterprise mock checks * fix(mcp): emit a truly invalid schema fault * feat(mcp): configure exact mock OAuth redirects * feat(mcp): strengthen mock OAuth verification * fix(mcp): accept Azure localhost OAuth callbacks * fix(mcp): close mock sockets across scenario restarts * fix(mcp): make mock listener restarts explicit
* fix(oauth): surface safe token exchange failures * test(oauth): use synthetic provider diagnostics
* feat(mcp): add enterprise MCP client package * refactor(mcp): harden enterprise client contracts * fix(mcp): preserve the first failing request phase --------- Co-authored-by: Benjamin Shafii <[email protected]>
# Conflicts: # ee/apps/den-api/test/microsoft-365-provider-scopes.test.ts
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Manager summary
Microsoft 365 previously exposed only three fixed read options in OpenWork: Outlook mail, calendar, and OneDrive. Administrators could not configure the broader capability choices available in the Google Workspace connector, and connected members did not have an end-to-end permission upgrade path for those capabilities.
This draft adds a Google-style progressive permission picker for Microsoft 365. The existing three read permissions remain the safe defaults. Calendar event creation, Outlook draft management, OneDrive writing and broader file access, and Teams chat capabilities are explicit administrator opt-ins.
The branch is intentionally still a draft. The implementation is safe enough to review and build on, while live-tenant verification of the expanded permissions can continue before approval.
What was there before
What this adds
Administrator permission picker
User.Read remains part of base sign-in. Exact scopes and the broader consequences of Microsoft read/write permissions are shown in the setup dialog.
Implemented operations
Permission enforcement
Each operation verifies all of these boundaries before Microsoft Graph is called:
Stronger Microsoft scopes now satisfy their narrower equivalents. For example, Mail.ReadWrite satisfies Mail.Read and Files.ReadWrite.All satisfies the narrower file scopes. This prevents false reconnect warnings while preserving fail-closed checks for missing consent.
Reconnect behavior
Permission-only updates retain the encrypted tenant client credentials. Members whose existing grant does not cover the new selection see Reconnect to grant new permissions. The next authorization request contains the newly selected delegated scopes.
What testing found and fixed
The proof work found four development-test gaps in addition to the product changes:
127.0.0.1even though the Entra development app was registered withlocalhost. The standard local runner now explicitly publisheshttp://localhost:<api-port>as its browser-facing API origin while retaining127.0.0.1for internal service traffic. This prevents AzureAADSTS50011redirect URI mismatch failures without changing production public-origin configuration.The Microsoft Graph mock now covers read and mutation endpoints so the verification exercises actual Den-to-Graph request shapes rather than only checking UI state.
Verification completed
http://localhost:33925/v1/oauth-providers/microsoft-365/connect/callback.Per the review plan, the full browser story was not replayed again after the clean rebase. That detailed replay can be performed during the next verification stage.
Important boundaries before approval
Proposed review and rollout
This PR targets dev directly and is designed to remain independently reviewable while the other MCP diagnostic branches are verified and merged.