Channels
Microsoft Teams
Connect Sophon to Microsoft Teams via Bot Framework.
Sophon connects to Microsoft Teams using the Azure Bot Framework. You'll register a bot in Azure, configure the messaging endpoint, and enable the Teams channel.
Prerequisites
- A Microsoft Azure account
- A Microsoft 365 tenant with Teams enabled
- Admin access to create app registrations in Azure AD
Step-by-Step Setup
1. Create an App Registration
- Go to Azure Portal > App registrations
- Click New registration
- Set:
- Name: Sophon Bot
- Supported account types: Accounts in any organizational directory (multi-tenant) or single tenant as needed
- Redirect URI: Leave blank
- Click Register
- Copy the Application (client) ID — this is your
appId
2. Create a Client Secret
- In your app registration, go to Certificates & secrets
- Click New client secret
- Set a description (e.g., "Sophon Bot Secret") and expiry
- Click Add and copy the Value immediately — you won't see it again
3. Create an Azure Bot
- Go to Azure Portal > Create a resource and search for Azure Bot
- Click Create
- Set:
- Bot handle: sophon-bot
- Pricing tier: F0 (Free)
- Microsoft App ID: Use the app registration from step 1 (paste the Application ID)
- App type: Multi Tenant (or Single Tenant)
- Click Review + Create > Create
4. Configure the Messaging Endpoint
- In the Azure Bot resource, go to Configuration
- Set the Messaging endpoint to:
https://your-domain.com/api/channels/teams/messages - Click Apply
For local development:
ngrok http 8080
# Use: https://xxxx.ngrok.io/api/channels/teams/messages5. Enable the Teams Channel
- In the Azure Bot resource, go to Channels
- Click Microsoft Teams
- Accept the terms and click Apply
6. Configure in Sophon Dashboard
- Go to Channels and click Add Channel
- Select Microsoft Teams
- Enter the Bot App ID (Application/client ID)
- Enter the Bot App Password (client secret value)
- Optionally set the Tenant ID (use
commonfor multi-tenant) - Click Test Connection
- Click Activate
7. Install the Bot in Teams
- In Teams, go to Apps > Manage your apps > Upload a custom app
- Or add the bot by its App ID through the Teams admin center
- Start a chat with the bot
Configuration Reference
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
appId | text | Yes | — | Application (client) ID from Azure app registration |
appPassword | secret | Yes | — | Client secret value |
tenantId | text | No | common | Azure AD Tenant ID (common for multi-tenant) |
channels.json Example
{
"id": "teams-bot",
"type": "teams",
"name": "Sophon Teams Bot",
"enabled": true,
"config": {
"appId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"appPassword": "<encrypted>",
"tenantId": "common"
},
"routing": {
"agentId": "default",
"dmBehavior": "main-session",
"groupBehavior": "mention-only"
},
"status": "connected"
}Troubleshooting
- "Unauthorized" (401) — The App ID or secret is wrong, or the secret has expired. Generate a new secret in Azure > Certificates & secrets.
- Bot not responding in Teams — Verify the messaging endpoint URL is correct and publicly accessible. Check that the Teams channel is enabled in the Azure Bot resource.
- "BotNotInConversationRoster" — The bot needs to be installed in the team or chat first. Upload the app package or add it via the Teams admin center.
- Multi-tenant auth errors — If using single-tenant, set
tenantIdto your specific Azure AD tenant GUID instead ofcommon. - Messages delayed — Teams has its own delivery guarantees. If Sophon is slow to respond, check your LLM provider health and response time.