Skip to content

Microsoft Teams

OMD Cleo integrates with Microsoft Teams using the Bot Framework. Users can chat with the Cleo agent directly in Teams without leaving their existing workspace.


How it works

Teams messages are routed through Azure's Bot Framework service to the Cleo backend:

User (Teams)
    ↓
Teams Client
    ↓
Bot Framework Service (Azure)
    ↓
Azure Bot (registered in your tenant)
    ↓
Cleo backend  POST /api/messages
    ↓
Agentic loop / LLM

Setup

Add teams to ENABLED_CLIENTS:

ENABLED_CLIENTS=teams

Required environment variables:

Variable Description
MICROSOFT_APP_ID App Registration client ID (MicrosoftAppId)
MICROSOFT_APP_PASSWORD App Registration client secret (MicrosoftAppPassword)

Azure prerequisites

  1. App Registration — Create an Azure App Registration. Set supported account types to Single tenant (for internal use) or Multi-tenant as needed. Generate a client ID and client secret.
  2. Azure Bot resource — Create an Azure Bot in the Azure portal. Point the messaging endpoint to: https://<your-domain>/api/messages
  3. Teams channel — Enable the Teams channel on the Azure Bot resource.
  4. App manifest — Deploy a Teams app manifest that references the bot's App ID. This makes the bot appear in the Teams app store for your organisation.

Message rendering

Teams messages are sent as plain text or as Adaptive Cards for richer formatting (tables, buttons, images). The agent selects the appropriate format based on the response content.


Authentication flow

When the Cleo bot is first contacted in Teams, the user may be prompted to authenticate against the OMD identity provider. This ensures the agent can act on behalf of the user when calling OMD MCP tools.


Reactive mode

Users send messages directly to the Cleo bot (1:1 chat) or in any Teams channel where the bot is installed. The agent replies in the same conversation thread.


Workflow mode

Workflows can deliver messages to Teams users by specifying channel: teams in the workflow invocation. The agent opens a proactive 1:1 conversation with each specified user.


Multi-tenant use

For a bot that serves users in multiple Azure tenants, set the App Registration's supported account types to Multi-tenant and configure the Teams app manifest accordingly. Contact OMD for guidance on multi-tenant deployment.