Email
Research
Email engineering guide

Retrieving Outlook mail through Microsoft Graph

Reliable Outlook retrieval combines least-privilege delegated access, paginated folder reads, per-folder delta links, selective bodies, and explicit support for shared mailbox context.

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

Authorize the mailbox owner and record the tenant

Use Microsoft identity to obtain the required delegated mail scopes, validate the returned identity, and bind tenant, user, and DewEngine account IDs. Do not infer ownership from an email address supplied before OAuth.

02
Initial retrieval

Page a bounded folder view

List folders, choose the product's synchronization set, request only necessary message fields, and follow @odata.nextLink rather than constructing the next URL. Hydrate MIME or attachments only when required.

  • Folder identity and hierarchy
  • Message and conversation IDs
  • Internet Message-ID
  • Body preview before full content
03
Incremental retrieval

Persist the opaque delta link per folder

Run message delta until Graph returns @odata.deltaLink, commit the resulting changes, and save the complete link unchanged. Moves and deletes require reconciliation across the folders the product synchronizes.

04
Shared access

Do not assume /me covers every Outlook scenario

Shared and delegated mailboxes depend on the signed-in user's rights and the selected Graph permissions. Represent the target mailbox explicitly and test the exact organization policy rather than promising universal shared-mailbox access.

  • Signed-in user identity
  • Target mailbox identity
  • Granted Graph scope
  • Organization-specific access policy
Questions

Before you build.

Should I store @odata.nextLink and @odata.deltaLink as parsed tokens?+

No. Treat the returned URLs as opaque provider state and replay them as documented; parsing or rebuilding them can lose encoded query state.

Can delegated Outlook access read any mailbox in the tenant?+

No. The app is limited by its delegated scopes and by the signed-in user's actual rights to the target mailbox.

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