Sign in
- Administrators open Settings > Archive configuration > Email intake. Members with Manage mailboxes open Settings > My account > Mailboxes. Add a mailbox and choose Microsoft.
- Enter the mailbox address. Administrators choose its Suchi owner; a member is selected automatically as the owner of their own mailbox.
- Click Sign in with Microsoft.
- Open the displayed Microsoft URL in any browser and enter the device code.
- Approve the requested mailbox access.
- Return to Suchi, save the mailbox, and run Test connection.
sealed_secret_b64: an
authenticated server-sealed creation handoff bound to {actor_id,system_id,credential}.
Create accepts it only for the same actor/target with current membership, then stores
the ordinary at-rest Microsoft credential. It is not arbitrary at-rest ciphertext
that can be copied from another mailbox or flow. The at-rest format below is unchanged.
Stored credential
Suchi stores a versioned, AEAD-sealed credential envelope containing the issuing public client ID and an opaque MSAL token cache. The cache can include access, refresh, and account data required for silent renewal. It is sealed with$DATA_DIR/.decrypt-key before entering SQLite.
Each poll asks MSAL for a valid token and reseals an updated cache when needed.
If tenant policy, consent revocation, or token expiry prevents refresh, the
mailbox reports an authentication error and requires explicit sign-in again.
Shipped registration
The project registration is configured for:- personal Microsoft accounts and organizational work or school accounts
- public-client device-code flow
- delegated Exchange
IMAP.AccessAsUser.All - automatic MSAL
offline_accessfor silent token renewal
Deployment registration
An organization may use its own Entra registration for tenant policy, admin consent, or deployment-specific naming. This is optional and is configured by the deployment operator, not through the Suchi UI. Create the registration in Microsoft Entra:- Open App registrations > New registration.
- Choose the required account audience. Select personal plus organizational accounts when both must work; a tenant-only deployment may choose its own organizational directory.
- Leave the redirect URI empty.
- Under Authentication, enable public client flows.
- Under API permissions, add delegated
IMAP.AccessAsUser.Allfrom Office 365 Exchange Online. - Grant tenant admin consent when organization policy requires it.
- Copy the Application (client) ID. Do not create a client secret. MSAL
requests
offline_accessautomatically during sign-in.
INGEST_IMAP_OAUTH_CLIENT_ID_MICROSOFT in the process environment. The
environment wins over the config file. Remove the value to restore Suchi’s
shipped registration on the next start.
Precedence is:
INGEST_IMAP_OAUTH_CLIENT_ID_MICROSOFTingest_imap_oauth_client_id_microsoftin the config file- Suchi’s shipped registration