# Teams setup prompt

Paste this into your coding agent (Claude Code, Codex, Copilot CLI…) with a browser tool such as Claude in Chrome. It walks you through creating your Azure Bot and connecting it to iKanban, asks before every create or save, and never handles your secret. In Claude Code, once This laptop is set up, `/ikanban-teams-setup` does the same.

```text
Help me connect Microsoft Teams to iKanban, so `@iKanban <what to do>` in a Teams channel starts an agent session and replies in the thread. Use the browser (Claude in Chrome, Playwright MCP or Chrome DevTools MCP). I sign in to Azure, Teams and iKanban myself. Ask me before every Create, Apply, Save, Connect or Add.

Rules
- Never read, print, paste, screenshot or store the client secret's Value. I copy it from Azure straight into iKanban. If it's on screen, take no screenshot until it's gone.
- Never enter payment details.
- If `.iKanban/settings-local.json` exists, read `api_url` into `U` and `api_key` into `K` without echoing the key.
- Go step by step. After each step, tell me what's ready and what I do next.

What I need first
- I'm an admin of the iKanban workspace.
- My Teams organisation allows uploading custom apps (Teams admin center → Teams apps → Setup policies → Upload custom apps).
- An Azure subscription in the same Microsoft tenant as my Teams (portal.azure.com, same work account). Microsoft requires one for any Teams bot; the Azure Bot Free tier costs nothing for Teams.

1. Get iKanban's messaging endpoint
   - Find my workspace id: `curl -s $U/api/tenant-workspaces -H "Authorization: Bearer $K"`.
   - `curl -s $U/api/workspaces/<id>/integrations/msteams -H "Authorization: Bearer $K"` → `messaging_endpoint`. Or open iKanban → Agent settings → Connections → Microsoft Teams → Connect and copy it from the dialog.

2. Create the Azure Bot
   - portal.azure.com → Create a resource → Azure Bot → Create.
   - Bot handle of my choice, Pricing tier Free, Type of App: Single Tenant, Create new Microsoft App ID → Review + create → Create.

3. Configure it
   - Bot → Settings → Configuration → Messaging endpoint = the endpoint from step 1, exactly → Apply.
   - Tell me to copy the Microsoft App ID and App Tenant ID.
   - Manage Password → Certificates & secrets → New client secret → Add. I copy the Value myself, now; it's shown once. Remind me to note its expiry.
   - Bot → Settings → Channels → Microsoft Teams → accept → Apply.

4. Connect in iKanban
   - Agent settings → Connections → Microsoft Teams → Connect. I paste the App ID, Tenant ID and secret Value, and pick the team and project for sessions → Connect.
   - "Microsoft didn't accept these credentials" usually means the secret's ID was pasted instead of its Value.
   - Then Download Teams app (ikanban-teams-app.zip).

5. Add it to Teams
   - Teams → Apps → Manage your apps → Upload an app → Upload a custom app → the zip → Add → choose the team.

6. Prove it
   - In that team's channel: `@iKanban reply with a one-line summary of this repository. Do not change any files.`
   - Expect a reply in the thread that updates as the agent works, then the answer.

Finish with one line per step: ready / needs action / couldn't check, and the fix.

```
