Teams Setup โ
Experimental: not part of 1.0
Chat-platform integrations (Slack, Microsoft Teams, Discord and spore-bot) are walled off for spore.host 1.0. The hosted spore-bot is decommissioned as of 2026-11: the spore.host Slack apps, the hosted Teams bot and its public endpoints are being retired, so there is nothing hosted to install or connect. The code is kept, and you can still self-host it, but it is experimental and unsupported, and it may change or be removed. See spore-host#611.
Connecting spore.host to Microsoft Teams gives you /spore commands in any channel and direct message notifications when your instances change state โ useful whenever you're away from the terminal.
What you'll get โ
Slash commands โ type these in any Teams channel:
/spore list โ all your registered instances
/spore status rstudio โ current state, type, URL, TTL countdown
/spore start rstudio โ start a stopped instance
/spore stop rstudio โ stop a running instance
/spore extend rstudio 4h โ extend the auto-terminate deadline
/spore hibernate rstudio โ hibernate (save RAM state; compute billing stops, EBS continues)
/spore connect โ generate a one-time code for a collaborator
/spore notify rstudio โ subscribe to DM notifications for this instance
/spore help โ command referenceProactive DM notifications for lifecycle events:
- rstudio terminates in 5 minutes
- bert-finetune has completed
- analysis has hibernated โ idle timeout reached
- training received a Spot interruption notice
Prerequisites โ
- A Microsoft 365 tenant with Teams
- Azure Bot registration (free tier is sufficient)
- Self-hosted spore-bot Lambda deployed in your AWS account โ see the self-hosting guide for full infrastructure setup
Step 1: Create an Azure Bot โ
- In the Azure Portal, go to Azure Bot and click Create
- Name it
spore-bot(or whatever you prefer) - Under Configuration โ Messaging endpoint, enter your spore-bot Lambda URL:
https://<your-lambda-url>/teams - Note your Bot ID (the app's Client ID) and Client Secret from the Azure Bot's Configuration page
Step 2: Create the Teams app manifest โ
Create a file manifest.json:
{
"manifestVersion": "1.17",
"version": "1.0.0",
"id": "<YOUR_BOT_APP_ID>",
"packageName": "host.spore.bot",
"developer": {
"name": "spore.host",
"websiteUrl": "https://spore.host",
"privacyUrl": "https://spore.host/privacy",
"termsOfUseUrl": "https://spore.host/terms"
},
"name": { "short": "spore-bot" },
"description": {
"short": "Control your EC2 instances from Teams",
"full": "Manage spore.host compute from Microsoft Teams"
},
"icons": { "color": "color.png", "outline": "outline.png" },
"accentColor": "#3399FF",
"bots": [
{
"botId": "<YOUR_BOT_APP_ID>",
"scopes": ["personal", "team", "groupchat"],
"commandLists": [
{
"scopes": ["personal", "team"],
"commands": [
{ "title": "list", "description": "List your instances" },
{ "title": "status", "description": "Show instance status" },
{ "title": "help", "description": "Show command reference" }
]
}
]
}
],
"composeExtensions": [
{
"botId": "<YOUR_BOT_APP_ID>",
"commands": [
{
"id": "spore",
"type": "action",
"title": "spore",
"description": "Control your spore.host instances"
}
]
}
],
"permissions": ["identity", "messageTeamMembers"],
"validDomains": ["spore.host"]
}Replace <YOUR_BOT_APP_ID> with the Azure Bot's app ID (Client ID). Zip the manifest with your icon files and sideload it in Teams Admin Center, or publish it to your org's app catalog.
Step 3: Connect your workspace โ
Register your Teams tenant with the spore-bot Lambda:
spawn notify workspace add \
--platform teams \
--workspace-id <TEAMS_TENANT_ID> \
--bot-token <AZURE_BOT_CLIENT_SECRET>Your tenant ID is visible in the Azure Portal under Azure Active Directory โ Overview (the Directory/Tenant ID field).
A Teams workspace has no signing secret. spore-bot accepts a Teams request only with a valid Bot Framework token: signed by Microsoft, issued for your bot's App ID (the Lambda's TEAMS_APP_ID), unexpired, and issued for the serviceUrl the bot will reply to. It refuses any other request, including a Teams outgoing-webhook (HMAC) request.
Never store the App ID as a secret
The App ID is public: it is in your Teams app manifest. An earlier version of this step passed it as --signing-secret. If you did that, delete the stored value and rotate the Azure Bot client secret (see Rotating bot credentials):
aws dynamodb update-item --region <REGION> --table-name spore-bot-workspaces \
--key '{"workspace_key":{"S":"teams#<TEAMS_TENANT_ID>"}}' \
--update-expression 'REMOVE signing_secret'Also delete your users' stored Teams conversation references (the spore-bot-registry items whose nickname is teams_ref). Each one is re-created by that user's next message to the bot.
Older spawn releases require --signing-secret for every platform. Upgrade spawn rather than pass one: never store the App ID, or any other value, as a Teams signing secret.
Step 4: Register an instance โ
Once the workspace is connected, register your instances so spore-bot can find them:
spawn notify register \
--platform teams \
--workspace-id <TEAMS_TENANT_ID> \
--user-id <TEAMS_USER_ID> \
--instance i-0a1b2c3d4e5f \
--nickname rstudioThe --nickname is what you use in Teams commands (/spore status rstudio). To find your Teams user ID, run:
spawn notify list --platform teams --workspace-id <TEAMS_TENANT_ID>--user (email) doesn't work for Teams
spawn notify register --user <email> resolves the address with Slack's users.lookupByEmail API, using the workspace's stored bot token. There is no Microsoft Graph lookup, so for Teams pass the Teams user ID with --user-id, or have the user run /spore connect and redeem the code (see Adding collaborators).
Then enable the registration:
spawn notify enable \
--platform teams \
--user-id <TEAMS_USER_ID> \
--workspace-id <TEAMS_TENANT_ID> \
--nickname rstudioStep 5: Enable notifications at launch โ
Set --slack-workspace to your Teams tenant ID and --notify-platform teams when launching to enable DM notifications:
spawn launch \
--name rstudio \
--instance-type r6i.2xlarge \
--ttl 8h \
--slack-workspace <TEAMS_TENANT_ID> \
--notify-platform teamsINFO
The --slack-workspace flag carries the workspace ID for every platform. The platform comes from --notify-platform (stored in the spawn:notify-platform tag), not from the workspace record, and it defaults to slack. Without --notify-platform teams, spored reports the instance's events as Slack events.
Or save the workspace as a default (pass --notify-platform teams on each launch):
spawn defaults set slack-workspace <TEAMS_TENANT_ID>Adding collaborators โ
Give a collaborator access to an instance without giving them AWS credentials.
spawn notify register \
--platform teams \
--user-id <COLLABORATOR_TEAMS_USER_ID> \
--workspace-id <TEAMS_TENANT_ID> \
--instance i-0a1b2c3d4e5f \
--nickname rstudio
spawn notify enable \
--platform teams \
--user-id <COLLABORATOR_TEAMS_USER_ID> \
--workspace-id <TEAMS_TENANT_ID> \
--nickname rstudioAlternatively, generate a one-time connect code that the collaborator redeems themselves:
/spore connect # generates a code like SPORE-XXXXXXThe collaborator runs:
spawn notify register --connect-code SPORE-XXXXXX --nickname rstudioManaging registrations โ
# List registrations for your workspace
spawn notify list --platform teams --workspace-id <TENANT_ID>
# Temporarily disable without deregistering
spawn notify disable \
--platform teams \
--user-id <TEAMS_USER_ID> \
--workspace-id <TENANT_ID> \
--nickname rstudio
# Permanently remove
spawn notify deregister \
--platform teams \
--user-id <TEAMS_USER_ID> \
--workspace-id <TENANT_ID> \
--nickname rstudioRotating credentials โ
To replace the Azure Bot client secret without downtime, and store the new value encrypted, see Rotating bot credentials.
Troubleshooting โ
Commands return "workspace not found" โ verify that --workspace-id matches the tenant ID used in spawn notify workspace add. Tenant IDs are UUIDs like 72f988bf-86f1-41af-91ab-2d7cd011db47.
Not receiving DM notifications โ ensure:
- The instance was launched with
--slack-workspace <TENANT_ID> --notify-platform teams - You've run
/spore notify <nickname>in Teams to subscribe
Teams bot not responding โ check the Lambda logs. The messaging endpoint in your Azure Bot configuration must match your Lambda URL exactly, including the /teams path suffix.
Proactive messages blocked โ Teams requires the bot to have an active conversation reference before it can send proactive DMs. Send the bot any message (e.g., hello) to establish the conversation, then lifecycle notifications will flow.