Skip to main content

Overview

A tenant in TenantCore represents a Microsoft 365 tenant that has been connected to your account via admin consent. Each tenant is owned by the user who performed the consent flow. You can only access tenants you connected. TenantCore supports up to 12 domains per connected tenant and up to 3 TenantCore mailboxes per domain, for up to 36 mailboxes per tenant. These are TenantCore product limits for the current outbound infrastructure model.

Connect a tenant

Returns the Microsoft admin consent URL for connecting a new tenant. Connecting a Microsoft 365 tenant requires a Global Administrator of that tenant to approve TenantCore’s permissions in an interactive browser session. This is a Microsoft platform requirement for any application requesting tenant-wide permissions — it cannot be automated by TenantCore or bypassed by this or any API.
This endpoint does not perform the redirect itself. It returns the URL so you can send your tenant admin through it from your own onboarding flow. The redirect always returns to TenantCore’s own callback — there is one registered application, and it finishes provisioning on TenantCore’s side once the admin approves. There is no webhook for completion. After the admin approves, poll GET /v1/tenants until the tenant appears, then call POST /v1/tenants/{tenant_id}/sync to refresh discovery and Exchange readiness. Example request
Example response
Errors

List tenants

Returns all tenants connected to your account, ordered by connection date, most recent first.
Example request
Example response
Response fields last_sync_at reflects the last time this data was refreshed. Use POST /v1/tenants/{tenant_id}/sync when you need an immediate refresh.

Get tenant

Returns a single tenant by its Microsoft tenant GUID.
Path parameters Example request
Example response
The tenant detail response exposes only documented customer-facing fields. readiness summarizes stored setup state so orchestration can determine whether ordinary management actions are ready without polling a separate infrastructure-health API. Errors

Sync tenant

Runs an on-demand synchronization for one connected Microsoft 365 tenant.
A tenant sync refreshes the Microsoft 365 state TenantCore relies on for supported management actions:
  1. Re-checks Exchange readiness and prepares required Exchange configuration where necessary.
  2. Ensures organization-level authenticated SMTP is enabled when the tenant is ready for that workflow.
  3. Re-runs tenant discovery so domains, mailboxes, counts, and tenant state reflect Microsoft 365.
This is especially useful after admin consent or when changes were made directly in Microsoft 365 outside TenantCore.
This request is synchronous and can take longer than a normal API read because it communicates with Microsoft Graph and Exchange Online. Use a client timeout appropriate for Microsoft provisioning operations.
Path parameters Example request
Example response
The nested bootstrap, smtp_auth, and result objects contain the detailed results returned by TenantCore’s Microsoft 365 synchronization services. Their contents may include additional fields as Microsoft/Exchange state changes. If Exchange bootstrap is not ready yet, SMTP AUTH is not attempted and the response reports:
The discovery sync still runs so TenantCore can refresh whatever Microsoft state is currently available. Errors

Delete tenant

Removes a tenant and all associated records from your TenantCore account. The Microsoft 365 tenant itself is not affected — only your local records are deleted.
This operation is irreversible. All domains, mailboxes, and sync history for this tenant will be permanently removed from TenantCore. The Microsoft tenant and its mailboxes are not modified.
Path parameters Example request
Example response
Errors

Keeping tenant data fresh

TenantCore periodically re-discovers domains and mailboxes for connected tenants. You can also trigger an immediate refresh at any time with:
Use this after Microsoft admin consent, after making changes directly in Microsoft 365, or whenever you need TenantCore to reconcile its stored domains, mailboxes, counts, Exchange bootstrap state, and SMTP AUTH readiness with Microsoft. Changes made directly through TenantCore’s API are generally reflected immediately in subsequent API calls. Sync is most important for Microsoft-side changes and propagation states that occur outside the API request that initiated them.