Outlook Provider Architecture¶
Scope¶
Outlook provider integrates Microsoft Graph calendar APIs into the provider contract used by EventCache and ProviderRegistry.
Key implementation files:
src/providers/outlook/OutlookProvider.tssrc/providers/outlook/parser/parser_outlook.tssrc/providers/outlook/auth/auth.tssrc/providers/outlook/auth/OutlookAuthManager.tssrc/providers/outlook/auth/config.tssrc/providers/outlook/ui/OutlookConfigComponent.tsx
Authentication Model¶
The provider uses OAuth Authorization Code with PKCE.
Flow:
- Plugin generates PKCE verifier/challenge and state.
- Browser opens Microsoft authorize endpoint.
- Local callback listener receives
codeandstate. - Plugin calls proxy
/api/microsoft/tokenwith PKCE verifier. - Tokens are persisted in
microsoftAccountssettings. - Refresh flow uses proxy
/api/microsoft/refresh.
Auth config resolution is centralized in auth/config.ts to avoid duplicated branching logic.
Data Mapping¶
Provider reads from Graph calendarView and maps Graph events to OFCEvent:
subject->titlestart/end->date,startTime,endTime,endDateseriesMasterId->recurringEventId(normalized toundefinedwhen null)- all-day events map to inclusive internal end-date semantics
For write operations, toOutlookEvent maps OFCEvent back to Graph payloads.
Provider Behavior¶
Capabilities:
- canCreate: true
- canEdit: true
- canDelete: true
Current constraint:
createInstanceOverrideis intentionally unsupported and returns a rejected Promise
Configuration UX¶
Outlook setup uses a two-step modal:
- Select connected account (or connect new account)
- Select one or more calendars from that account
Saved source naming includes account email to prevent ambiguity across accounts.
Integration Boundaries¶
- Provider exposes only contract-compliant events to core
- Registry remains the single routing surface
- No provider-specific branching is introduced in EventCache mutation path