Prerequisites
- A Courier Test API key
- Access to the Azure portal and the Teams Developer Portal
- A team where you can install a custom app
- A published template with a Microsoft Teams channel
The bot is the sender
Courier stores the bot’s credentials once, on the integration. Each send then says where to post, with an id for the channel or person and the organization’stenant_id.
The bot can post only where its app is installed, so installing the app is part of setup. A send to a team without the app fails even with correct credentials.
Send it
1
Create the bot and connect it to Courier
You need three things: an Azure app registration, a bot, and a Teams app that contains the bot. The Microsoft Teams integration page walks each screen.Then add the bot’s credentials to Courier’s Microsoft Teams integration. Both come from the bot’s app registration in Azure, not the Teams app’s. App ID takes the bot’s Application (client) ID, and App Password takes its client secret value.
2
Install the app in the team
Download the app package from the Teams Developer Portal (Publish, then Download the app package). In Teams, open Apps, Manage your apps, and Upload an app.Then open the team, choose Manage team, open the Apps tab, and add your app. Uploading covers one-to-one messages only, and channel posts fail until the app is in the team.
3
Copy the channel's ids
In Teams, open the channel’s … menu and choose Copy link. The link carries both ids you need:URL-decode the path segment after
Channel link
/channel/ for the channel id, 19:5140d7460868414cac958ac76a0a94d0@thread.skype. Newer channels end in @thread.tacv2 instead. The tenantId query parameter is the organization, dabd1935-56a4-4305-938e-0840e2e84515.Sending by channel_id needs no Microsoft Graph permissions. Someone still installs your app in the team, so the organization’s Teams settings must allow custom apps.4
Send to the channel
Put the ids in
to.ms_teams and send a template with a Teams channel.service_url defaults to https://smba.trafficmanager.net/amer, the Americas endpoint. Microsoft lists https://smba.trafficmanager.net/teams as its global endpoint, without a trailing slash, because Courier adds the path.Message a person instead
Swap the channel id for the person’semail, and keep tenant_id and service_url:
Recipient
user_id instead, store the ms_teams object on the user’s profile once, as Users explains.
Verify
1
Check the channel
The message appears in the channel from your bot, with your app’s name and icon.
2
Read the status
Open Logs and find the send. A credential or install problem shows as
All Bot Framework authentication methods failed, followed by the HTTP status.What changes in production
Customers’ organizations need one more field. To post into a customer’s Teams, send your bot’s home tenant assource_tenant_id alongside their tenant_id. Move off Teams Incoming Webhooks covers collecting and storing each customer’s ids.
Client secrets expire. Azure asks for an expiry date when you create the secret. Rotate it in Courier’s Teams integration before that date, or every send fails with Failed to acquire any Bot Framework authentication token.
Coming from an Incoming Webhook? Microsoft retired Office 365 Connectors in May 2026. Move off Teams Incoming Webhooks maps each webhook URL to a channel send.