Connect a Microsoft Teams bot to any Friday workspace so users can chat with it over DM orDocumentation Index
Fetch the complete documentation index at: https://docs.hellofriday.ai/llms.txt
Use this file to discover all available pages before exploring further.
@mentions. Messages flow into the same conversation pipeline the web chat uses, and replies go back to Teams.
You create the Azure Bot at portal.azure.com, build a Teams app package, and connect via Studio.
Prerequisites
- An Azure account with an active subscription. The F0 pricing tier for Azure Bot is free and sufficient for development.
- Admin rights in a Microsoft 365 tenant that lets you sideload custom Teams apps. A personal Microsoft account (“Teams free”) does not work — you need a work/school tenant or a Microsoft 365 Developer Program tenant.
- Friday running with the bundled tunnel active (Azure Bot requires a public HTTPS URL —
http://is rejected).
Setup
Create the Azure Bot
- Open portal.azure.com and click Create a resource → search for Azure Bot.
- Fill in:
- Bot handle — a unique identifier, e.g.
friday-studio-bot - Pricing tier — F0 (free)
- Type of App — Single Tenant if you only plan to install into one M365 tenant; Multi Tenant for cross-tenant distribution. This choice is immutable — see SingleTenant vs MultiTenant.
- Creation type — Create new Microsoft App ID
- Bot handle — a unique identifier, e.g.
- Click Review + create → Create. Provisioning takes 30–60s.
Collect three credentials
From the Bot resource you just created:
The tenant ID is only required for SingleTenant bots, but it’s harmless to set either way.
| Value | Where |
|---|---|
| Microsoft App ID | Bot resource → Configuration → Microsoft App ID |
| Client secret value | Manage Password → Certificates & secrets → New client secret → copy Value |
| Directory (tenant) ID | App Registration → Overview → Directory (tenant) ID |
Connect Teams in Studio
- In Studio, select your workspace from the sidebar and click Info.
- Find the Communicators card and click Connect next to Microsoft Teams.
- Paste the App ID, Client Secret, Tenant ID, and select the App Type (SingleTenant or MultiTenant) into the form, then submit.
Point Azure at your messaging endpoint
- Open Studio → Settings → Webhook tunnel and copy the URL — something like
https://<random>.trycloudflare.com. - In the Azure portal, open your Bot resource → Configuration → Messaging endpoint and set it to
<tunnel>/platform/teams, e.g.https://<random>.trycloudflare.com/platform/teams. - Click Apply.
- Under Channels, click Microsoft Teams, accept the ToS, and enable the channel.
Build and sideload a Teams app package
Azure Bot is the API endpoint; the Teams app package is what puts your bot in front of real users. It’s a zip containing
manifest.json plus two icons.- Create a directory with this
manifest.json(replace<APP_ID>with your Microsoft App ID):manifest.json - Drop a 192×192 PNG named
color.pngand a 32×32 PNG namedoutline.pngbeside the manifest. - Zip those three files (manifest must be at the root of the archive, not inside a subfolder).
- In Teams, go to Apps → Manage your apps → Upload an app → Upload a custom app and pick the zip.
- Click Add when Teams prompts. The bot appears in your apps list.
Talk to your bot
- Open the bot’s app page in Teams and click Chat to start a DM.
- Send a message. The first message creates a chat in the workspace — it should appear in Studio with a TEAMS badge, and replies flow back to Teams automatically.
- To
@mentionthe bot in a channel, add the app to the team first, then@<bot-name> hello.
SingleTenant vs MultiTenant
| Type | Tenant ID required | When to pick |
|---|---|---|
| SingleTenant | Yes | You only install the bot into your own M365 tenant (most dev setups). |
| MultiTenant | No | The same bot will be installed across multiple tenants (SaaS). |
Authorization has been denied for this request on outbound replies — inbound routing still looks fine, which makes it easy to miss.
Troubleshooting
Inbound activities arrive but outbound replies 401
Inbound activities arrive but outbound replies 401
app_type doesn’t match the Bot Service’s registered Type of App. Check Azure Bot → Configuration → Type of App and reconnect via Studio with the matching value.Bot is installed in Teams but receives no messages
Bot is installed in Teams but receives no messages
Most likely the Teams channel isn’t enabled in Azure. Go to Bot resource → Channels → click Microsoft Teams → accept ToS and enable. Second most likely: the messaging endpoint in Azure points at a stale tunnel URL.
Inbound 401 (not outbound)
Inbound 401 (not outbound)
The incoming JWT is being rejected. Usual causes: the App ID you pasted doesn’t match the Bot’s Microsoft App ID, or a missing tenant ID on a SingleTenant bot.
Tunnel URL keeps changing
Tunnel URL keeps changing
The bundled Cloudflare quick-tunnel gets a new random URL every restart. Each restart requires updating the Messaging endpoint in the Azure portal. For stable development, use a named Cloudflare tunnel, ngrok paid, or a real reverse proxy on your own domain.
Production notes
- Rotate the client secret under App Registration → Certificates & secrets. Azure doesn’t let you edit an existing secret — create a new one, reconnect via Studio with the new value, then delete the old one.
- Client secrets expire (default 24 months). When they do, every outbound reply returns 401 until you rotate.
Configure via YAML
Skip Studio and configure from disk
Skip Studio and configure from disk
For CI or fully scripted setups, paste credentials directly into Restart Friday so the new config is picked up.
workspace.yml or the .env file in the Friday home directory (default ~/.friday/local/.env). app_id is always required.- Credentials inline
- Credentials via env
workspace.yml

