Email
Research
Email engineering guide

Building an Outlook mailbox integration with Microsoft Graph

Microsoft Graph provides the official Outlook mail surface, but a durable integration still needs correct consent, per-folder delta state, subscription renewal, and provider-specific message behavior.

Research surface only. This guide documents architecture and evaluation criteria; it does not describe a released DewEngine connector.
01
Identity

Select the correct Microsoft access model

For a user-connected inbox, delegated permissions usually match the product boundary. App-only permissions are intended for background organizational access and normally require administrator consent; they should be a separate enterprise mode.

02
Mail resources

Keep Outlook folders and message IDs intact

Model messages, attachments, drafts, folders, and sending through common resources, but retain Graph IDs, parentFolderId, conversationId, internetMessageId, categories, and change metadata for provider-specific operations.

  • Messages and MIME content
  • Folders and categories
  • Draft, send, reply, move, and delete
  • Shared and delegated mailbox context
03
Change tracking

Maintain a delta link for each synchronized folder

Microsoft Graph message delta is a per-folder operation. Follow every @odata.nextLink until the round returns @odata.deltaLink, store that opaque URL, and track each folder independently rather than inventing one mailbox-wide cursor.

04
Subscriptions

Use notifications to trigger delta, then renew them

Graph change-notification subscriptions expire and must be renewed. Validate the notification endpoint, deduplicate events, handle lifecycle notices, and use delta to reconcile the authoritative state instead of trusting a notification as the full message record.

  • Subscription expiration monitor
  • Lifecycle notification handler
  • Delta reconciliation after gaps
Questions

Before you build.

Does Outlook email integration use the retired Outlook REST API?+

No. New implementations should use Microsoft Graph, Microsoft's current unified API surface for Outlook mail and calendar data.

Can one delta link synchronize every mail folder?+

No. Message delta is scoped to a folder, so each synchronized folder needs its own state and processing round.

Can I use DewEngine's email connectors today?+

Not yet. Gmail, Microsoft Graph, and IMAP/SMTP connectors are planned. This guide documents the intended architecture and the provider requirements a production release must satisfy.

Build with us

Does this match the workflow your users need?

DewEngine is in development. Real use cases decide what ships first.

Share your use case