Skip to main content

Microsoft calendar events and local tasks

The BFF /calendar page shows a mailbox's own Outlook calendars. Microsoft Graph supplies events. Tasks remain local to the account's session. Existing mail.read and mail.crud access works alongside calendar.read and calendar.manage permissions.

Complete Microsoft Graph setup before enabling provider access.

Installation prerequisites​

Apply mailGen/ECS_MovePST_To_TempSQL/DB_Lib/Sql/20260927_calendar_catalog.sql through the deployment's controlled schema path. Generate both backend and BFF Prisma clients from their own schemas, then restart the affected processes.

Event writes require Entra application permission Calendars.ReadWrite with administrator consent. Calendars.Read supports read-only access but not event mutations.

Catalog and search​

GraphPullPoller runs a calendar catalog worker for active Microsoft mailboxes. It scans due calendars approximately every five minutes, with one-minute worker ticks. It indexes individual events and recurring series masters without a time-window restriction into tenant_data.calendar_event.

tenant_data.calendar_sync_state stores the next refresh, last success, and worker lease. Missing events/calendars are deleted from the projection only after complete successful pagination. On Graph failure, existing indexed data remains and retry timing applies.

The top search checks title, location, and text preview in the index. Pages contain at most 100 mailbox-scoped items. The migration's pg_trgm indexes support substring search. Search covers all own calendars and series, independently of the visible date range.

The calendar view requests concrete occurrences from Graph calendarView for the displayed period.

Actions and time zones​

New events go to the default Outlook calendar. Edits and deletion use the event's source calendar. For a recurring occurrence, choose that occurrence or the whole series.

Graph-origin notes are read-only during editing to preserve existing meeting content. Local tasks remain separate.

The UI shows times in the device's local time zone. Graph responses normalize timestamps to UTC. All-day events retain their calendar date. Before save, the UI checks title, a valid local time, and end-after-start order.

The catalog can lag Outlook by several minutes. On failure, search warns that results can be stale. New-event creation currently creates a single event. Existing Outlook recurring series can be managed. Check the provider result after a permitted write.