---
title: "Check Provider Health"
method: POST
path: "/v2/mailbox-settings/provider-health"
tags: ["mailbox-settings"]
---

# Check Provider Health

`POST /v2/mailbox-settings/provider-health`

## Request

- Base URL: `https://api.stuut.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stuut.ai/v2/mailbox-settings/provider-health`
- Auth: HTTP bearer

Probes admin-consent state from Microsoft Graph and writes the result back
to settings — catches out-of-band portal consent and revocation. Uses the
tenant id recorded at consent time (admin consent returns the authoritative
tenant); skips the probe if it's missing. Returns the refreshed
EmailSettings. Safe to poll.

## Response `200`

Successful Response

- EmailSettings
  - `transport_provider` 'nylas' | 'sendgrid', required
  - `hybrid_mode_enabled` boolean, required
  - `microsoft` MicrosoftConnection, required: The org's Microsoft mailbox connection: consent state and Entra details.
    - `enabled` boolean, required: Whether Microsoft mailbox connections are enabled for this org.
    - `admin_consented` boolean, required: Whether Entra admin consent has been granted.
    - `admin_consented_at` string, date-time, nullable, required
    - `application_scopes` string[], required: Application (app-only) Graph scopes consented in this tenant.
    - `delegated_scopes` string[], required: Deprecated, no longer refreshed — reading tenant-wide delegated grants requires Application.Read.All. Returns whatever the last directory-backed probe recorded, and is empty for any org consented since.
    - `azure_tenant_id` string, nullable, required: Customer's Entra tenant GUID.
    - `azure_client_id` string, nullable, required: Entra app client ID — Stuut's for most tenants, the customer's for BYO.
    - `is_byo` boolean, required: True when the org supplied their own Entra app credentials.
    - `uses_legacy_entra_app` boolean, required: True when this org is on a retired shared credential — the legacy Entra app or the shared common credential — and should be prompted to re-authenticate / migrate onto its own per-tenant credential.
  - `google` GoogleConnection, required: The org's Google mailbox connection state.
    - `enabled` boolean, required: Whether Google mailbox connections are enabled for this org.
  - `centralized_inbox` CentralizedInboxSettings, required: Routing / auto-assignment config for the centralized inbox.
    - `auto_assign` boolean, required
    - `auto_assign_threshold` integer, required
    - `matching_guidelines` string, nullable, required
  - `sendgrid` SendGridSettings, required: SendGrid transport configuration.
    - `domain_name` string, nullable, required: Authenticated outbound sending domain.
    - `inbound_parse_hostname` string, nullable, required: Hostname for SendGrid Inbound Parse.
    - `effective_inbound_hostname` string, nullable, required: Resolved inbound hostname (falls back to the sending domain).
    - `has_api_key` boolean, required: True when a SendGrid API key is configured.

---

[API](https://skmtc.dev/stuut/apis/stuut-api.md) - [All operations](https://skmtc.dev/stuut/apis/stuut-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stuut/apis/stuut-api/revisions/ff0ad16a55ff?raw)
