Handle Delegated OAuth Callback
Exchanges the authorization code for a grant, then creates the mailbox for the authenticated user — or refreshes an existing one if this is a re-auth (same grant email already connected).
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Response
Successful Response
The account's email.
Email owner's name.
Mail provider — 'microsoft', 'google', 'imap', 'sendgrid', etc.
How this mailbox was authenticated (delegated vs application).
delegated, application Whether this email sender should be shared with the entire organization
Whether this sender is a centralized inbox that accepts net-new inbound emails for routing
Computed connection health. CONNECTED, EXPIRED, or DISCONNECTED.
connected, expired, disconnected When the mailbox was disconnected from Stuut. Kept around for historical email attribution rather than deleted.
Owning user. NULL for shared mailboxes.
Email signature html.
This account's default reply-to
String representing the object's type. Objects of the same type share the same value.
True when this Microsoft mailbox's grant was minted against the legacy Entra app and must be re-authenticated to migrate onto the current app.
