Microsoft Teams Integration Setup
This guide is for self-hosted deployments that want to enable Teams chat with the Inbox Zero assistant.What Teams currently supports
- AI assistant chat in direct messages with the Inbox Zero bot
- Account linking with one-time
/connect <code>commands
- Channel-based meeting brief delivery
- Channel-based attachment filing notifications
1. Create an Azure Bot resource
- Go to portal.azure.com
- Click Create a resource, search for Azure Bot, and select it
- Click Create and fill in:
- Bot handle: a unique identifier for your bot
- Subscription: your Azure subscription
- Resource group: create new or use existing
- Pricing tier: F0 (free) for testing
- Type of App: Single Tenant (recommended) or Multi Tenant
- Creation type: Use existing Microsoft App ID or create a new one
- Click Review + create, then Create
2. Get your app credentials
From your new Bot resource:- Go to Configuration
- Copy Microsoft App ID — this is your
TEAMS_BOT_APP_ID - Click Manage Password (next to Microsoft App ID)
- In the App Registration page, go to Certificates & secrets
- Click New client secret, add a description, choose an expiry, click Add
- Copy the Value immediately (it’s only shown once) — this is your
TEAMS_BOT_APP_PASSWORD - Go to Overview and copy Directory (tenant) ID — this is your
TEAMS_BOT_APP_TENANT_ID
3. Set the messaging endpoint
- In your Azure Bot resource, go to Configuration
- Set Messaging endpoint to:
- Click Apply
4. Enable the Teams channel
- In your Azure Bot resource, go to Channels
- Click Microsoft Teams
- Accept the terms of service
- Click Apply
5. Create and upload the Teams app package
Create amanifest.json file with your bot details:
<your-app-id> with your TEAMS_BOT_APP_ID and your-domain.com with your actual domain.
You’ll also need two icon files: a 32×32 outline.png and a 192×192 color.png. Zip those three files together.
To install for testing (sideloading):
- In Teams, click Apps in the sidebar
- Click Manage your apps → Upload an app
- Click Upload a custom app and select your zip file
- Go to the Teams Admin Center
- Go to Teams apps → Manage apps
- Click Upload new app and select your zip file
- Use Setup policies to control who can access the app
6. Set environment variables
Set these inapps/web/.env (or your deployment env):
TEAMS_BOT_APP_ID or TEAMS_BOT_APP_PASSWORD is missing, the Teams connect option is hidden in the UI and /api/teams/events returns 503.
7. Connect a user account from Inbox Zero
Each Inbox Zero email account links to a Teams user via a connect code:- In Inbox Zero, go to Settings → Connected Apps
- Click Connect Teams
- Copy the generated command:
/connect <code> - Open a DM with the Inbox Zero bot in Teams
- Send the command
8. Validate end-to-end
Quick checks:POST /api/teams/eventsreturns200for valid bot activity- Sending
/connect <code>in the bot DM links the account - A normal DM message gets an assistant response