Skip to content
All tools

connect_m365_account

Microsoft 365 · macOS · Windows

Effect: write (strongest supported action). Status: gated.

Gated means the tool requires an installed app, a connected account, permission, or runtime availability. Check those requirements on the listed platform before using it.

macOS

Purpose

Connect a Microsoft 365 account (or add another one, or sign one in again). The first call returns a preview and starts nothing; confirm: true gets a login code. Call again after you've authenticated at microsoft.com/devicelogin to finish the connection. Pass include_channel_messages: true to also read Teams channel messages and search them — that permission needs an administrator of your Microsoft 365 organization; without that approval the sign-in is refused and the account keeps its current access.

Required inputs

No required inputs are declared in this platform's schema. Optional selectors and runtime requirements may still apply.

Permissions and confirmation

Explicit confirmation parameter: inspect the schema and tool description before any real call. The documentation example keeps confirm false. Obtain user authorization before performing the action.

Full input schema — macOS
{
  "properties": {
    "account_type": {
      "description": "\"work\" (default): a work or school Microsoft 365 account — mail, calendar, contacts, Teams. \"personal\": an Outlook.com / Hotmail / Live account — mail, calendar and contacts only (Microsoft has no Teams chats or directory for personal accounts, and asking for them makes Microsoft refuse the sign-in as an 'expired code'). Ask the person which one it is when unsure.",
      "enum": [
        "work",
        "personal"
      ],
      "type": "string"
    },
    "confirm": {
      "description": "Must be true to start the sign-in. Without it the call returns a preview and does nothing.",
      "type": "boolean"
    },
    "include_channel_messages": {
      "description": "Also request access to Teams channel messages and message search. Needs an administrator of the Microsoft 365 organization; without that approval this sign-in is refused and the account keeps its current access.",
      "type": "boolean"
    }
  },
  "required": [],
  "type": "object"
}

Documentation example

Do not execute this example. These concrete inputs refer to a fictional demonstration dataset. Resolve real handles and obtain user authorization before any real call.

{
  "confirm": false
}

Windows

Purpose

Connect a Microsoft 365 account (or add another one, or sign one in again). The first call returns a preview and starts nothing; confirm=true gets a login code, then call again after authenticating at microsoft.com/devicelogin to finish. Pass include_channel_messages: true to also read Teams channel messages and search them — that permission needs an administrator of your Microsoft 365 organization; without that approval the sign-in is refused and the account keeps its current access.

Required inputs

No required inputs are declared in this platform's schema. Optional selectors and runtime requirements may still apply.

Permissions and confirmation

Explicit confirmation parameter: inspect the schema and tool description before any real call. The documentation example keeps confirm false. Obtain user authorization before performing the action.

Full input schema — Windows
{
  "properties": {
    "confirm": {
      "description": "Must be true to start the sign-in. Without it, returns a preview.",
      "type": "boolean"
    },
    "include_channel_messages": {
      "description": "Also request access to Teams channel messages and message search. That permission needs an administrator of the Microsoft 365 organization; without that approval this sign-in is refused and the account keeps its current access.",
      "type": "boolean"
    }
  },
  "required": [],
  "type": "object"
}

Documentation example

Do not execute this example. These concrete inputs refer to a fictional demonstration dataset. Resolve real handles and obtain user authorization before any real call.

{
  "confirm": false
}