Capture thoughts from Microsoft Teams — DM the bot or @mention it in a channel.
- Working Cerebro setup (Getting Started completed)
- Microsoft 365 tenant with Teams
- Azure subscription (Bot Channels Registration is free for Teams)
- Admin access to your M365 tenant (for sideloading the app)
TEAMS CAPTURE -- CREDENTIAL TRACKER
--------------------------------------
ENTRA ID APP REGISTRATION
Application (client) ID: ____________ <- Step 1
Client secret value: ____________ <- Step 1
Tenant ID: ____________ <- Step 1
AZURE BOT
Bot handle: ____________ <- Step 2
Messaging endpoint: ____________ <- Step 3
--------------------------------------
This creates the identity your bot uses to authenticate with the Bot Framework.
- Go to the Azure Portal → Microsoft Entra ID → App registrations
- Click New registration
- Name:
Cerebro Bot - Supported account types: Accounts in any organizational directory (Multitenant)
- Redirect URI: leave blank
- Click Register
Copy the Application (client) ID and Directory (tenant) ID into your credential tracker.
- In your new app registration, go to Certificates & secrets
- Click New client secret
- Description:
cerebro-bot-secret - Expiry: choose your preference (24 months recommended)
- Click Add
- Copy the Value immediately — you won't see it again. Paste into your credential tracker.
- In the Azure Portal, search for Azure Bot and click Create
- Fill in:
- Bot handle:
cerebro-bot(or your preference) - Subscription: your Azure subscription
- Resource group: create new or use existing
- Data residency: Global
- Pricing tier: F0 (Free) — this is all you need for Teams
- Type of App: Multi Tenant
- Creation type: Use existing app registration
- App ID: paste your Application (client) ID from Step 1
- Bot handle:
- Click Review + Create → Create
- Wait for deployment to complete
- Go to your new Azure Bot resource
- Click Channels in the left sidebar
- Click Microsoft Teams
- Accept the terms
- Click Apply
From your Cerebro project directory (where you ran supabase link):
supabase secrets set TEAMS_BOT_APP_ID=your-application-client-id
supabase secrets set TEAMS_BOT_APP_SECRET=your-client-secret-value
OPENROUTER_API_KEY,SUPABASE_URL, andSUPABASE_SERVICE_ROLE_KEYshould already be set from the initial setup.
supabase functions new cerebro-teamsCopy the contents of integrations/teams-capture/deno.json into supabase/functions/cerebro-teams/deno.json.
Copy the contents of integrations/teams-capture/index.ts into supabase/functions/cerebro-teams/index.ts.
Deploy:
supabase functions deploy cerebro-teams --no-verify-jwtYour function is now live at:
https://YOUR_PROJECT_REF.supabase.co/functions/v1/cerebro-teams
-
Go back to your Azure Bot resource in the portal
-
Click Configuration in the left sidebar
-
Set Messaging endpoint to:
https://YOUR_PROJECT_REF.supabase.co/functions/v1/cerebro-teams -
Click Apply
The Teams app manifest tells Teams about your bot. You need to customize it with your Bot App ID, then package it as a ZIP for sideloading.
- Open
integrations/teams-capture/teams-app/manifest.json - Replace both instances of
{{BOT_APP_ID}}with your Application (client) ID from Step 1
Create a ZIP file containing the three files from the teams-app/ directory:
cd integrations/teams-capture/teams-app
zip cerebro-teams-app.zip manifest.json color.png outline.png- Go to Teams Admin Center
- Teams apps → Setup policies → Global (Org-wide default)
- Turn on Upload custom apps
- Click Save (may take a few minutes to propagate)
- Open Microsoft Teams (desktop, web, or mobile)
- Click Apps in the left sidebar
- Click Manage your apps → Upload an app
- Select Upload a custom app
- Choose the
cerebro-teams-app.zipfile you created - Click Add
-
In Teams, find Cerebro in your apps or chat list
-
Start a 1:1 chat with the bot
-
Type a thought:
Sarah mentioned she's thinking about leaving her job to start a consulting business -
You should see a confirmation reply with the extracted metadata
-
In any Team channel where the app is installed, type:
@Cerebro Just had a great architecture review meeting with the platform team -
The bot captures the thought (stripping the @mention) and replies in the thread
Open Supabase Dashboard → Table Editor → thoughts. You should see new rows with metadata.source = "teams".
- Check the messaging endpoint in Azure Bot Configuration — must be the exact Edge Function URL
- Verify secrets are set:
supabase secrets listshould showTEAMS_BOT_APP_ID,TEAMS_BOT_APP_SECRET,OPENROUTER_API_KEY - Check Edge Function logs in Supabase Dashboard → Edge Functions →
cerebro-teams→ Logs
- The App ID or Secret may be wrong. Double-check they match your Entra ID app registration
- Ensure the app registration is set to Multitenant (required for Bot Framework)
- Admin must enable "Upload custom apps" in Teams Admin Center (Step 5)
- It can take up to 24 hours to propagate after enabling
- Check that the Edge Function deployed successfully: visit
https://YOUR_PROJECT_REF.supabase.co/functions/v1/cerebro-teamsin a browser — should return{"status":"ok","service":"cerebro-teams"} - Check Supabase Edge Function logs for errors
- Cold start on Edge Functions takes a few seconds. Subsequent messages are faster.
Before moving on, confirm all of these pass:
- Personal DM — typing a thought to the Cerebro bot returns a confirmation with extracted metadata (topics, people, type)
- Channel @mention — @mentioning the bot in a channel captures the thought and replies in the thread
- Supabase data — Table Editor →
thoughtsshows rows withmetadata.source="teams" - Edge Function health — visiting
https://YOUR_PROJECT_REF.supabase.co/functions/v1/cerebro-teamsin a browser returns{"status":"ok","service":"cerebro-teams"}
If any check fails, see the Troubleshooting section above.
By default Cerebro processes messages from any user in your Teams tenant. To
restrict it to specific users, set the TEAMS_ALLOWED_SENDERS secret to a
comma-separated list of Azure AD Object IDs:
supabase secrets set TEAMS_ALLOWED_SENDERS=aad-object-id-1,aad-object-id-2Look up a user's AAD Object ID with Azure CLI:
az ad user show --id user@example.com --query id -o tsvWhen the allowlist is set, unauthorized senders receive a friendly rejection message. When the secret is empty or unset, all users are allowed (future multi-user mode).
For an additional layer of protection, create a Teams app permission policy that blocks Cerebro for everyone except authorized users:
- Block globally: Add Cerebro to the Global policy's
PrivateCatalogAppsblocked list via Teams PowerShell - Allow per-user: Create a
Cerebro-Allowedpolicy with an empty block list and assign it to authorized users
# Block Cerebro in Global policy
$blockedApp = New-Object Microsoft.Teams.Policy.Administration.Cmdlets.Core.PrivateCatalogApp
$blockedApp.Id = "<cerebro-org-app-id>"
$blockedList = [System.Collections.Generic.List[Microsoft.Teams.Policy.Administration.Cmdlets.Core.PrivateCatalogApp]]::new()
$blockedList.Add($blockedApp)
Set-CsTeamsAppPermissionPolicy -Identity 'Global' -PrivateCatalogAppsType 'BlockedAppList' -PrivateCatalogApps $blockedList
# Create allow policy and assign to a user
New-CsTeamsAppPermissionPolicy -Identity 'Cerebro-Allowed'
Grant-CsTeamsAppPermissionPolicy -Identity 'user@example.com' -PolicyName 'Cerebro-Allowed'When you capture a thought that mentions a future date or time (e.g. "remind me to check the deployment logs next Friday at 10am"), Cerebro can automatically create calendar events on O365 and/or Google Calendar.
See Reminders Setup for configuration instructions.