Microsoft 365 / Outlook adapter
Connect Microsoft calendars through the premium interoperability adapter. Delta queries and conditional writes support incremental change handling while the application retains control over authorization and reconciliation.
What you configure
- createMicrosoft365Adapter
- Supply a runtime access-token provider and optional calendarId.
- timeZone / timeZoneMap
- Choose display-zone behavior and map uncommon Windows time-zone identifiers.
- delta cursor
- Retain the provider's delta link together with the prior remote snapshot.
Essential integration
This assumes the shared Quick start already provides premiumLicense and, for UI views, premiumCalendarOptions. Only the feature-specific setup is shown.
import { PremiumCalendarInteroperability } from '@wts-calendar/core/premium-interoperability';
import type {
CalendarSynchronizationRequest,
CalendarInteropMutation,
} from '@wts-calendar/core/premium-interoperability';
const interoperability = new PremiumCalendarInteroperability({ license: premiumLicense });
// Call after your application obtains an authorized session.
export function connectOutlook(getAccessToken: () => string | Promise<string>) {
const adapter = interoperability.createMicrosoft365Adapter({
accessToken: getAccessToken, // Default calendar; optionally supply calendarId.
timeZone: 'UTC',
});
return {
// Initial sync: omit cursor. For deltas, supply the retained remoteBase snapshot.
preview: (request: CalendarSynchronizationRequest) =>
interoperability.synchronize(adapter, {
...request,
conflictPolicy: 'manual',
push: false,
}),
// Call only after the user resolves conflicts and approves the mutation plan.
commit: (mutations: readonly CalendarInteropMutation[], signal?: AbortSignal) =>
adapter.push(mutations, signal ? { signal } : {}),
};
}
// Example call in your session handler (do not use the WTS key as an OAuth token):
// const connection = connectOutlook(getAccessToken);
// const plan = await connection.preview({
// start: '2026-09-01T00:00:00Z', end: '2026-10-01T00:00:00Z',
// base: lastCommonEvents, local: currentEvents,
// });
// Show plan.reconciliation.conflicts and plan.mutations in your UI.
// After approval, await connection.commit(approvedMutations).
// Pull again and retain the fresh remote IDs/ETags, cursor and common base.Behavior and lifecycle
- The adapter maps deletions, cancellations, all-day events, and supported event metadata.
- Create, update, and delete operations retain conditional version handling through ETags.
Limits and responsibilities
- Tenant permissions, authentication, and provider availability are outside the WTS license.
- Supply mappings for tenant-specific or uncommon time zones and validate them with representative events.
Enable this capability
- Optional module
- @wts-calendar/core/premium-interoperability
- Local capability ID
- premium-interoperability · enabled by package-wide Premium
Use the request form to describe your project and deployment origins. Pricing and terms are confirmed privately. A WTS license is separate from provider credentials; do not send passwords or production access tokens.
The live example uses a browser-visible deployment key restricted to this package and approved origins. It does not collect license keys or visitor credentials.