Integration with Microsoft Teams
This page explains how DIAL integrates with Microsoft Teams through a custom bot, so users can reach DIAL's models and applications without leaving their primary communication tool. It is written for developers who want to understand the architecture and design decisions before building a similar integration. It describes the approach at a conceptual level rather than providing step-by-step deployment instructions.
Note
A hands-on, step-by-step tutorial — with a complete sample repository, file-by-file walkthrough, and Azure setup steps — is planned. It will be published once a paired sample bot is available. This page covers the architecture and design rationale in the meantime.
The problem and the design goal
Modern workplaces rely on many specialized tools, and constantly switching between applications disrupts workflow. Users need access to DIAL's capabilities without leaving the environment where they already communicate. A custom Microsoft Teams bot creates a bridge between the two platforms.
We designed the integration around three goals:
- Provide a consistent user experience across environments.
- Work in both private and group chat contexts.
- Handle authentication appropriately for each context.
The result is that Microsoft Teams users can use DIAL's models and tools directly inside their conversations, while DIAL continues to enforce its existing role-based access control.
What the bot does
The bot brings selected DIAL functionality into Microsoft Teams chats while respecting each user's permission level:
- Use any model or application available in DIAL, subject to the user's permissions.
- Access existing DIAL conversations directly in Microsoft Teams (when enabled).
- Manage conversations — clear history, switch topics — and use the Playback feature. Conversation management is available when the feature is enabled by configuration.
Architecture
The integration has three main components:
- Microsoft Teams client — the Teams UI the user interacts with.
- DIAL Chat Bot Service — a middle layer built with the Microsoft 365 Agents SDK. It proxies traffic between Teams and DIAL.
- DIAL Core — the backend that exposes the Unified API and performs all model orchestration.
These components are connected through two Microsoft services:
- Azure Bot Service handles the messaging infrastructure and initial authentication.
- The Microsoft Teams app manifest defines the bot's presentation and capabilities within Teams.
The request path is:
[Microsoft Teams] <--> [Azure Bot Service] <--> [DIAL Chat Bot Service] <--> [DIAL Core]
Conversation handling
The DIAL Chat Bot Service acts as a proxy that converts communication between the Teams client and DIAL. The bot receives events from Teams through the Azure Bot Service, which handles authentication and token verification first. The Azure Bot Service then delivers clean events to the service — for example, a notification that a specific user sent a message in a particular chat.
The service forwards these requests to DIAL Core through the Unified API, then transforms DIAL's responses into a Teams-compatible format. Because Teams does not support direct HTML formatting, the service uses Adaptive Cards to render interactive elements — model and conversation selection cards, data tables, code blocks, inline images, collapsible attachment sections, and action buttons.
The bot maintains conversation context by mapping Teams conversation IDs to the corresponding DIAL sessions, which preserves continuity across interactions.
Media file handling
Media handling addresses the different ways Teams transfers files. When users send images in Teams, small images may be embedded directly in the message, while larger files are uploaded to Microsoft SharePoint with a link sent to the bot. The bot detects each format, retrieves the file, and uploads it to DIAL.
For files that flow from DIAL back to Teams, the service uses a configurable cloud storage backend as an intermediary. Files are uploaded to the storage provider, and signed URLs generate secure, time-limited links that Teams can display. The implementation supports Azure Blob Storage (Shared Access Signature tokens), AWS S3 (pre-signed URLs), and GCP Cloud Storage (V4 signed URLs).
Signed URLs expire. When a user returns to a conversation after a URL has expired — typically after a period such as a month — the files are no longer visible in the Teams chat history, although they remain available in DIAL itself.
State storage
The bot persists conversation state and user state in a configurable backend. One option uses Azure Blob Storage, with support for both connection-string and managed-identity authentication. An alternative backend stores state directly in DIAL's own file storage, which removes the Azure dependency entirely. The backend is selected by configuration at startup.
Authentication and authorization
The bot uses two authentication approaches, chosen by conversation context. For background on how DIAL handles authentication and authorization, see Auth and access control.
- Private chats — the bot acts on behalf of the individual user. The Azure Bot Framework manages the login flow with the configured identity provider, obtains a token, and the bot uses that token to authenticate with DIAL. For the identity providers DIAL supports, see SSO / IdP setup. Microsoft Graph integration for file access is optional and enabled when configured.
- Group chats — the bot uses a pre-configured API key instead of individual credentials. This gives every group member a consistent experience but limits access to the models and applications the API key is permitted to use.
The Azure Bot Service handles token management and authentication flows, which lets the bot implementation focus on relaying information between Teams and DIAL.
Deployment components
A production deployment of the bot relies on the following infrastructure:
- Azure Bot Registration — configured with the messaging endpoint for API communication.
- Azure App Service — hosts the bot and holds its App ID and client secret.
- OAuth connections — a DIAL connection for user authentication.
- Microsoft Graph — used to access files stored in SharePoint when Graph integration is enabled.
- Azure Key Vault — stores DIAL API keys, Azure App credentials, and storage connection strings.
- Kubernetes — runs the containerized bot service with environment-specific configuration and ingress for HTTP traffic with TLS.
Technical stack
The reference implementation uses:
- Bot framework — Azure Bot Service / Azure AI Foundry.
- SDK — Microsoft 365 Agents SDK (.NET in this implementation).
- Authentication — Microsoft Identity Platform and OAuth 2.0.
- File storage — Azure Blob Storage, AWS S3, or GCP Cloud Storage, selected by configuration.
- Communication — REST APIs against the DIAL Unified API.
Further reading
- Integration with Microsoft Copilot — a step-by-step connector setup you can follow today
- Auth and access control — the guides for authenticating callers and controlling access
- SSO / IdP setup overview — compare supported identity providers and the shared setup workflow
- Embed AI in existing tools — reaching users inside Teams, Excel, and automation tools
- Unified API reference — the API the bot calls into DIAL