

What it does
Collect messages and attachments from one folder in a Microsoft 365 mailbox, including a shared mailbox. Use a separate source instance for each folder you want to collect.Before you start
- Ask a tenant admin for the directory ID and a Microsoft Entra app registration with app-only
Mail.Readaccess to the target mailbox. Follow the Microsoft 365 setup guide to scope access in Exchange Online. - Get the application client ID and either a client secret or a certificate and its RSA private key. Register the public certificate on the Entra app.
- Have a collection (a Corpus in the API) and an API key with
connectors:read,connectors:write,content:readandsearch:queryfor it. - Set
credential_keyin your Quivr deployment so it can store the application credential.
Enable it
1
Find the mail source
Look for
m365_mail in GET /v0/connector-kinds. If it is missing, pin the plugin. Local development points to a simulated Graph API.2
Create an instance
Follow Collect from a source with kind
m365_mail. Set tenant_id and mailbox in config. Use the mailbox’s address or object ID.
In the same request, supply client_id with either client_secret or both certificate_pem and private_key_pem in credential.secret. Rotate the credential before it expires.Use it
Collect a mailbox folder
Leaveconfig.folder unset to collect the inbox, or set it to a well-known folder name or Graph folder ID. Collection starts with mail received from the first poll by default. To include recent mail, set config.backfill_since to an RFC 3339 timestamp within the seven days before that poll.
After Quivr indexes the messages from a successful run, search the collection for words from a message’s subject or body.