mailbox-settings

Handle Admin Consent Callback

Unauthenticated: Microsoft redirects the browser here without a Stuut session, so the signed state token is the only proof of who started the flow. We verify it, derive the org from its claims, and open a tenant session for that org. On success, stamps the consent timestamp and stores the granted scopes; on failure, raises with the provider error.

post/v2/mailbox-settings/microsoft/consent-callback

Request

  • Base URL
    https://api.stuut.ai (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Request body

admin_consentboolean required

True if Microsoft returned admin_consent=True.

tenantstring nullable

Tenant GUID, if the provider redirect includes it. The tenant is already resolved and persisted at consent-url time, so the callback does not rely on it.

statestring required

The signed state token from the consent URL, echoed back.

scopestring nullable

Scopes consented, space-delimited.

errorstring nullable

OAuth error code on failure.

error_descriptionstring nullable

Response

Successful Response

transport_provider'nylas' | 'sendgrid' required
hybrid_mode_enabledboolean required

Changes

No recorded changes to this operation across all 2 revisions of this API.