Microsoft 365

Connect Microsoft 365

m365_connect · Changes data · Markdown

Connects the company's Microsoft 365 through its own app, for the mailboxes the agent may act as.

Free

This tool costs nothing to call.

An example

Connect our Microsoft 365 for support@ only. Here is the app's tenant, client ID and secret.

Your agent callsm365_connectFree

The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.

With these arguments
{
  "tenant_id": "hansenvoss.onmicrosoft.com",
  "client_id": "6b1f0c2e-example-app",
  "secret": "example-client-secret",
  "mailboxes": [
    "support@hansenvoss.example"
  ]
}
What comes back
{
  "microsoft365": {
    "tenant_id": "hansenvoss.onmicrosoft.com",
    "mailboxes": [
      "support@hansenvoss.example"
    ],
    "connected_at": "2026-10-14T08:00:00+00:00"
  },
  "need_approval": [
    "m365_calendar_cancel",
    "m365_files_upload"
  ]
}

Use it when

The company uses Outlook and OneDrive and wants the agent to work in them there.

What it does

Connect the company's own Microsoft 365 so the agent works in its Outlook mail, calendars and OneDrive files, which stay the source of truth. The company registers an app in Microsoft Entra ID with the application permissions Mail.ReadWrite, Mail.Send, Calendars.ReadWrite and Files.ReadWrite.All, and its admin consents. Give its tenant_id, client_id and client secret, and the mailboxes the agent may act as (it never acts as anyone else). Each mailbox is checked before anything is kept. On accounts with an owner, cancelling events and replacing files wait for the owner's approval by default. Free.

What comes back

microsoft365: tenant_id, mailboxes and connected_at; need_approval, the tools that now wait for the owner. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
tenant_idRequiredstring3 to 120 characters.
client_idRequiredstring3 to 120 characters.
secretRequiredstringThe app's client secret. Never shown again. 8 to 2,000 characters.
mailboxesRequiredarray of stringsThe addresses the agent may act as, like support@ and sales@. 1 to 20 items.

The call

Over MCP, call m365_connect on https://api.conecto.chat/mcp/microsoft365. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/m365_connect \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tenant_id":"hansenvoss.onmicrosoft.com","client_id":"6b1f0c2e-example-app","secret":"example-client-secret","mailboxes":["support@hansenvoss.example"]}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
invalid_input400A mailbox is not an email address, or none was named.Name 1 to 20 mailboxes.
vendor_rejected502Microsoft refused the tenant, client ID or secret, or a mailbox.Check the app's permissions and the admin's consent.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md