What It Does
- fetches emails from a configurable mail folder in a Microsoft 365 mailbox
- authenticates directly against Microsoft Entra ID using the OAuth2 client credentials flow (app-only, non-interactive)
- converts HTML email bodies to Markdown for indexing
- runs ingestion on configurable schedules
Authentication
Only the client credentials flow (app-only) is supported. This requires:- An Azure app registration that can read the target mailbox, using one of the two options below.
- A Microsoft 365 / Entra ID work or school account mailbox. Personal Microsoft accounts are not supported — client credentials flow is not available for them.
Mailbox Access Options
To use the scoped option, follow RBAC for Applications in Exchange Online: create a management scope, register the app’s service principal in Exchange with
New-ServicePrincipal, then assign the role with New-ManagementRoleAssignment -App <service-principal-id> -Role "Application Mail.Read" -CustomResourceScope <scope>.
Required Environment Variables
Set these in.env.rag:
OUTLOOK1_CLIENT_ID: Azure app registration client IDOUTLOOK1_CLIENT_SECRET: Azure app registration client secretOUTLOOK1_TENANT_ID: Azure tenant / directory IDOUTLOOK1_USER_EMAIL: mailbox owner email address (example:user@company.onmicrosoft.com)OUTLOOK1_SCHEDULES: ingestion interval in seconds (default is3600)
config.yaml Example
.env.rag Example
Configuration Reference
Multiple Outlook Sources
Add moresources entries (outlook2, outlook3, etc) with separate env vars per source.