Docs: shared mailbox (M365/Exchange) spec for review (#31) - #59
Docs: shared mailbox (M365/Exchange) spec for review (#31)#59CityDweller wants to merge 3 commits into
Conversation
Proposed design for Issue #31 — shared mailbox support with auto-detection. Parked behind the Graph backend PRs; submitted now for review so the design is agreed before any code. Covers: IMAP XOAUTH2 access with the shared address in the user= field (no Graph needed), Autodiscover detection (+ the new EWS.AccessAsUser.All scope and the Azure app-registration dependency), a recommended linked-account model that avoids a schema migration, RFC 2342 NAMESPACE for generic IMAP, UX/accessibility, a PR breakdown, edge cases, tests, and open questions for review.
The "maintainer adds a scope" step read as if it were per-mailbox or per-user-tenant. Adds shared-mailboxes spec section 6.2-6.3 and mirrors a concise version into the Graph PM spec 9.3: - one app registration = QuickMail's own identity (maintainer's tenant), NOT per mailbox or per user-tenant; declaration (maintainer, once) vs. consent (each user's tenant, at sign-in); end users never create a registration. - Microsoft-only concept; Gmail / generic IMAP are unaffected. - the real friction is tenant policy: admin-consent handling (AADSTS65001 / 90094 + an admin-consent URL), publisher verification for the "unverified" warning, and a per-account custom client-ID escape hatch for locked tenants. - multi-tenant + personal-MSA registration is a prerequisite to verify.
|
Added a "Microsoft consent model & app registration" section (§6.2–6.3) after a good question about how the scope/registration actually works. It clears up a common misconception:
Since the identical model governs the Graph |
- Graph PM spec 9.3: add a complete delegated-permission table (User.Read, Mail.ReadWrite, Mail.Send, MailboxSettings.Read, User.ReadBasic.All, offline_access, openid/profile) with the reason + consent level for each. - Add User.Read and User.ReadBasic.All to GraphMailScopes (dev spec 6.8) for the /me identity probe and directory/GAL user search (recipient autocomplete / finding a user). Note the People.Read alternative and that directory-read is the permission most likely gated behind admin consent. - Clarify that EWS.AccessAsUser.All (shared mailboxes) is a separate Exchange Online permission, not a Graph one.
|
@CityDweller — this has been open since Jun 9 with no activity, and a lot has shipped since. Is it still live, or superseded? Asking rather than closing it, because I can't tell from the outside. Since this was opened, the Graph/M365 backend landed end to end (read path, send, mutations, folder nesting, change notifier), M365/Exchange went default-on in 0.8.35, and the whole server-rules stack (#334, #335, #337, #339, #364, #367) merged. A shared-mailbox spec written before any of that may describe a design the implementation has since diverged from — or it may still be the plan of record for work nobody has started. Three ways this can go:
@kellylford — flagging for you too, since #31 is the underlying request and whether shared mailboxes are still on the roadmap is your call, not something I should infer from the branch going quiet. |
|
Still live — option 1. Shared mailboxes are still on my list; the branch went quiet because I deliberately parked this behind the Graph/M365 and server-rules work, which is exactly what's been shipping. That stack has now largely landed (the Graph backend end-to-end, default-on M365 in 0.8.35, and the server-rules chain #334/#335/#337/#339/#364/#367 — #367 merged just now), so this is next up after the one server-rules piece still in flight: the unified single-list rules manager (§20 of the server-rules spec). Your divergence worry is fair, but I think what shipped has de-risked the design rather than invalidated it:
So the plan of record holds; it needs a refresh pass, not a rewrite. I'll rebase #59 onto |
|
Reviewed against 1. The central assumption has changed — §3.1 and §3.4The spec's headline is that this rides the existing IMAP/OAuth stack and "does not wait on, or benefit from, the Graph work". That was true when written. It isn't now. #393 routes work-or-school Microsoft 365 accounts on a custom domain onto the Graph backend by default. The IMAP path requests That is precisely the user in §2: a blind or low-vision worker on a corporate M365 tenant. Their parent account is now a Graph account, which means:
So §3.1's "The scope QuickMail already requests — Two ways out, and I think the spec should pick one explicitly rather than inherit the old assumption:
Worth being precise about what §3.4 still gets right: Graph cannot return the automapped list, so detection still has to go through Autodiscover regardless. What has changed is access. The clean split is probably "detect via Autodiscover, access via whatever backend the parent account uses" — which is a bigger change than the spec currently contemplates. This likely reopens §5.1's Approach A/B analysis, since the linked-account model's main appeal was reusing the per-account IMAP pool. I still think Approach B is right — but for the "no schema migration, first-class in the UI" reasons rather than the connection-reuse one. 2. §6.1 is stale
That hasn't been true since #208 / #218 / #242. There are five arrays now — Also worth noting the consent-impact line understates things now. Per Microsoft's docs, once a grant exists 3. Resource identifier mismatch — worth pinning down before the registration editThe spec writes 4. What the new Autodiscover client does and does not give you — §7#393 added
Not reusable, and each is real work:
Also a lifecycle difference worth designing around: settings discovery runs before sign-in, from the add-account dialog, on an address with no token. Shared-mailbox discovery runs after sign-in, per account, with a token, and wants periodic refresh. 5. §14 Q4 — the parking condition is satisfied but inverted"Confirmed parked behind the Graph backend PRs." Graph has landed and is on by default, so the gate is lifted — but the reason for parking has flipped. The spec parked this because Graph was incomplete; now Graph being complete and default is what invalidates §3.1. What I would keep unchangedThe linked-account recommendation, the manual "add shared mailbox by address" fallback for automapping-disabled grants, and the RFC 2342 NAMESPACE path for generic IMAP — that last one is genuinely low marginal cost and is unaffected by any of the above, since non-Microsoft IMAP accounts still use the IMAP backend. The §2 problem statement is also worth restating: Outlook surfaces these automatically and no accessible client does it well. That is still the reason to build it. Suggested amendments
|
Design spec for Issue #31 — shared mailbox support with auto-detection, submitted for review.
Key findings baked into the spec
user=field.IMAP.AccessAsUser.All(already requested) suffices.AlternativeMailbox— which needs theEWS.AccessAsUser.Allscope for discovery only, plus enabling it on the Azure app registration.mailbox-dimension approach, which is a much wider change.Decisions I'd like your call on (spec §14)
EWS.AccessAsUser.All(O365 Exchange Online, delegated) to the shared client ID, and does your tenant need admin consent? Access works without it; only auto-detection depends on it.mailboxdimension from the issue? This is the biggest design fork.No rush given it's parked — review whenever; I'll fold your answers in before implementation begins.