INFO
Before this page: the bot is registered and its three values are in
.env or setup-secret.sh — Create the Teams bot. On a company tenant you build the package and your Teams admin uploads it; on an evaluation tenant you do both.Why a hand-built package
The Developer Portal’s Download app package emits manifest version 1.30, and uploading that package to Teams fails with “Manifest parsing error message unavailable”. Build the package by hand on schema 1.19 — the version walked live.Build the app package
1
Generate the app id
Run
uuidgen (PowerShell: [guid]::NewGuid()). This GUID is the app’s id — not the bot id.2
Write manifest.json
Copy the template below and replace every
<placeholder>.3
Add the two icons
color.png — 192×192, full colour. outline.png — 32×32, white on a transparent background.4
Zip the three files flat
No folder inside the zip — the three files sit at its root:In PowerShell:
Compress-Archive -Path manifest.json,color.png,outline.png -DestinationPath sariva-teams-app.zip.Why the app asks to read channel messages
Withoutauthorization, Teams sends Sariva only the channel messages that @mention it, so every reply in a thread needs @Sariva again. The two resource-specific permissions let Teams send the rest, and Sariva decides what is meant for it:
- a message that @mentions Sariva — answered;
- a personal chat with Sariva — answered;
- a reply in a thread Sariva is already part of — answered without the @mention;
- everything else — a new post without @Sariva, a thread Sariva was never asked into, a group chat without @Sariva — ignored, with no reply.
ChannelMessage.Read.Group covers team channels. ChatMessage.Read.Chat applies only if the bot is ever installed in a group chat ("groupChat" in its scopes, which this template does not include); there Sariva still answers only an @mention. webApplicationInfo.resource does nothing for these permissions, but Teams rejects the manifest without a value. Any string works.
Upload to the org catalog
1
Upload the package
In Teams: Apps → Manage your apps → Upload an app → Upload an app to your org’s app catalog → pick
sariva-teams-app.zip. On a company tenant, this is the step your Teams admin does.2
Add it to the alerts channel's team
Apps → Built for your org → Sariva → Add → Add to a team → pick the alerts channel. A team owner does this step: Teams lists the permissions the app asks for (reading the team’s channel messages), and the owner accepts them for that team.
Update an installed app
The package was first published without the message permissions? Then Sariva answers a channel reply only when it carries @Sariva. To fix that:1
Edit manifest.json
Add the
webApplicationInfo and authorization blocks from the template above, and raise "version" (for example 1.0.0 → 1.1.0). Keep the same app id.2
Re-zip
The same three files, flat, as in Build the app package.
3
Upload the new version
Teams admin center → Teams apps → Manage apps → Sariva → Upload file → pick the new zip. The update can take a while to reach the teams.
4
Re-add it to each team (a team owner)
Permissions are granted when the app is added to a team, so the teams that already have it need it added again. In the team: ⋯ → Manage team → Apps → remove Sariva. Then Apps → Built for your org → Sariva → Add → Add to a team → the same channel, and accept the permissions. Repeat for every team that owns an app channel.
WARNING
- Upload custom apps must be allowed — Teams admin center → Teams apps → Setup policies and Org-wide app settings.
- On a brand-new tenant, the Manage apps actions are greyed out for about 30 minutes. Wait; nothing is wrong.
- Team owners must be allowed to consent to the message permissions. The default tenant setting (
ManagedByMicrosoft) allows it. If your tenant turned it off, re-enable it with Microsoft Graph PowerShell:Set-MgBetaTeamRscConfiguration -State EnabledForAllApps.
Point Sariva at the alerts channel
Create the channel in the Posts layout. The Threads layout is not supported yet; see Channels and conversations.- In Teams, open the channel’s ⋯ menu → Get link to channel.
-
Take the
19:…@thread.tacv2part of the link and URL-decode it:%3A→:,%40→@. The GUID elsewhere in the link is the team, not the channel. -
Set it in the platform environment —
.envon the VM path, the chart’sextraEnvon EKS: -
Recreate the container so it reads the new value (
docker compose restartdoes not re-read.env):
TEAMS_ALERTS_CHANNEL_ID — not from customer_config.yaml. This channel gets cluster-level alerts (cluster unreachable / recovered, CFK pod OOMKilled and CPU) and advisories about an app with no Teams channel.
Per-app alerts
Each app that should alert in Teams needsteams_channel_id on its registration — found the same way as above. The bot must be installed in that channel’s team too: repeat Add to a team for each team that owns an app channel. A post into a team without the bot fails and is logged as per_app_alert_engine_teams_post_failed.
Verify
1
Validate the bot identity
sariva validate teams passes — the token grant, plus the shape of TEAMS_ALERTS_CHANNEL_ID when it is set.2
Say hi
Send “hi” to @Sariva in the channel, or in a personal chat with the bot. It replies — proving the inbound endpoint, the token check and the outbound reply.
3
Reply without the @mention
In the thread Sariva just answered, reply “what can you do?” with no @Sariva. It answers. A new channel post without @Sariva gets no answer — that is correct.
4
See an alert land
An alert for a registered app with a
teams_channel_id lands in that channel.Continue the deployment path
Back to the VM path
Running on a Linux VM? Return to the VM checklist.
Back to the prerequisites checklist
Return to the full prerequisites list for your deployment path.