docs: refresh for Teams CLI Preview onboarding#2786
docs: refresh for Teams CLI Preview onboarding#2786umangsehgal wants to merge 18 commits intomainfrom
Conversation
Brings the docs site in line with the published Teams CLI v2.1 Preview, replaces ATK-as-primary framing with the CLI flow, and adds dedicated quickstarts for registering and building a bot. - Add Get Started section with two quickstarts: Register your app (CLI flow, language-aware run tabs) and Build your first bot (TS/C#/Python tabs with real scaffolded code, persisted via groupId) - Replace teams/configuration/ (ATK-centric) with teams/azure-configuration.mdx (manual Azure path, CLI as recommended) - Reframe core-concepts, manifest, code-basics, static-pages, and enabling-in-copilot to lead with the Teams CLI - Rewrite running-in-teams template: CLI flow first, ATK section retained as alternative - Drop stale CLI invocations (npx new, config add atk.basic/atk.oauth, --atk flag) across templates and includes - Move agent-skills to CLI Getting Started (was under Guides, unreachable from sidebar) - Add navbar/footer link to /cli/, pivot announcement bar to "Teams CLI is in Preview" - Add Copy-for-LLM button via swizzled DocItem/Layout (respects llms: ignore) - Sync CLI command docs to actual binary (regen + index.md fixes: -y/--yes, drop --disable-auto-update, drop misleading new alias) - Fix broken anchor #troubleshooting-sso → #troubleshooting in user-authentication template - Replace incomplete CLI bash with TODO in sso-setup.mdx with pointer to complete CLI guide - Correct authentication.md (login opens browser by default, not device code) - Soft sidebar fix: collapse Essentials and In-Depth Guides per language by default - Fix trailing-comma JSON in teams/user-authentication/_category_.json Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Refreshes the Teams SDK docs site to align onboarding and guidance with the published Teams CLI v2.1 Preview, adding new CLI-first quickstarts and updating navigation/content away from ATK-as-primary framing.
Changes:
- Adds “Copy for LLM” UI in doc pages and supporting CSS.
- Introduces new “Get started” section + quickstarts (register app, build first bot) and updates many templates to use
teams ...commands. - Updates CLI docs/nav/announcement bar; removes legacy Teams configuration docs and replaces with a new manual Azure configuration page.
Reviewed changes
Copilot reviewed 42 out of 43 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| teams.md/src/theme/DocItem/Layout/index.tsx | Swizzled DocItem layout to inject “Copy for LLM” button (respects llms: ignore). |
| teams.md/src/css/custom.css | Adds styling for announcement bar links + “Copy for LLM” button. |
| teams.md/src/pages/templates/in-depth-guides/user-authentication.mdx | Reframes auth setup around CLI + bot migration + links to CLI auth setup guide. |
| teams.md/src/pages/templates/in-depth-guides/tabs/getting-started.mdx | Updates tab getting-started to CLI scaffolding + quickstart register link. |
| teams.md/src/pages/templates/in-depth-guides/server/static-pages.mdx | Copy edit to de-emphasize toolkit framing. |
| teams.md/src/pages/templates/in-depth-guides/category.json | Collapses In-Depth Guides by default. |
| teams.md/src/pages/templates/essentials/category.json | Collapses Essentials by default. |
| teams.md/src/pages/templates/getting-started/running-in-teams/README.mdx | Rewrites “Running in Teams” to a CLI-first sideload/register flow; keeps ATK as alternate. |
| teams.md/src/pages/templates/getting-started/quickstart.mdx | Updates quickstart install guidance to global @preview install + /cli/ links. |
| teams.md/src/pages/templates/getting-started/code-basics.mdx | Updates next-steps copy to point to CLI-based “run in Teams”. |
| teams.md/src/components/include/in-depth-guides/user-authentication/typescript.incl.md | Updates scaffold command to teams project new .... |
| teams.md/src/components/include/in-depth-guides/user-authentication/csharp.incl.md | Updates scaffold command to teams project new .... |
| teams.md/src/components/include/in-depth-guides/user-authentication/python.incl.md | Updates scaffold command to teams project new .... |
| teams.md/src/components/include/in-depth-guides/message-extensions/settings/typescript.incl.md | Updates comment to reflect CLI env var behavior. |
| teams.md/src/components/include/getting-started/running-in-teams/typescript.incl.md | Adds run-command section for TS run instructions. |
| teams.md/src/components/include/getting-started/running-in-teams/csharp.incl.md | Adds run-command section for C# run instructions. |
| teams.md/src/components/include/getting-started/running-in-teams/python.incl.md | Adds run-command section for Python run instructions. |
| teams.md/src/components/include/getting-started/quickstart/typescript.incl.md | Updates scaffold command to teams project new .... |
| teams.md/src/components/include/getting-started/quickstart/csharp.incl.md | Updates scaffold command to teams project new .... |
| teams.md/src/components/include/getting-started/quickstart/python.incl.md | Updates scaffold command to teams project new .... |
| teams.md/sidebars-cli.ts | Adds CLI “agent-skills” page into sidebar. |
| teams.md/docusaurus.config.ts | Adds CLI to navbar/footer; updates announcement bar to “Teams CLI is in Preview”. |
| teams.md/docs/main/welcome.mdx | Updates welcome page to new Get started flow + CLI-first path. |
| teams.md/docs/main/get-started/category.json | Adds new “Get started” category. |
| teams.md/docs/main/get-started/quickstart-register.md | New quickstart for registering/sideloading via Teams CLI + language run tabs. |
| teams.md/docs/main/get-started/quickstart-build.md | New quickstart for wiring first message handler (TS/C#/Python). |
| teams.md/docs/main/developer-tools/devtools/inspect.md | Updates sideloading reference to new quickstart-register. |
| teams.md/docs/main/teams/README.md | Updates Teams section index to include Azure Configuration page. |
| teams.md/docs/main/teams/core-concepts.md | Reframes core concepts around CLI teams app create and bot locations. |
| teams.md/docs/main/teams/manifest.md | Updates manifest guidance to point to CLI manifest/package commands. |
| teams.md/docs/main/teams/enabling-in-copilot.md | Adds CLI-based workflow for uploading manifest + downloading package. |
| teams.md/docs/main/teams/user-authentication/category.json | JSON cleanup (formatting/trailing comma removal). |
| teams.md/docs/main/teams/user-authentication/sso-setup.mdx | Replaces incomplete manual CLI snippet with pointer to full CLI guide + skill. |
| teams.md/docs/main/teams/azure-configuration.mdx | New manual fallback page for Entra app + Azure Bot setup. |
| teams.md/docs/main/teams/configuration/manual-configuration.mdx | Deletes legacy manual-configuration page (superseded). |
| teams.md/docs/main/teams/configuration/agents-toolkit.md | Deletes legacy Agents Toolkit configuration page (reframed elsewhere). |
| teams.md/docs/main/teams/configuration/category.json | Deletes legacy “Basic Configuration” category. |
| teams.md/docs/main/teams/configuration/README.md | Deletes legacy configuration README. |
| teams.md/docs/cli/getting-started/installation.md | Removes deprecated --disable-auto-update docs; clarifies update cadence. |
| teams.md/docs/cli/getting-started/authentication.md | Updates login flow to browser-by-default + --device-code for headless. |
| teams.md/docs/cli/getting-started/agent-skills.md | New page describing teams-dev agent skill installation/usage. |
| teams.md/docs/cli/commands/index.md | Updates global flags list and command tree formatting. |
| teams.md/docs/cli/commands/status.md | Syncs autogenerated status flags (removes verbose line). |
Fixes flagged by reviewers (heyitsaamir, rido-min, Copilot):
quickstart-register.md:
- Step 3: language-tabbed scaffolding so C# / Python paths are correct (C# nests Echo.Bot/Echo.Bot/); drop inline template list
- Step 4: drop redundant --teams-managed flag (it's the default)
- Step 4: cut Teams-managed vs Azure comparison table (link to /cli/concepts/bot-locations instead)
- Step 5: drop curl 401 verify (not portable, unfriendly); describe expected log output instead
- Step 6: use install link printed by app create (no separate app get without appId, which triggers an interactive picker)
quickstart-build.md:
- Python snippet now matches the actual scaffold from `teams project new python` (on_message_pattern greeting handler + branching logic, not the simplified version)
running-in-teams template:
- Same install-link fix; same --teams-managed drop
- Drop curl verify
sso-setup.mdx:
- Reflect reality: the CLI provides primitives but doesn't orchestrate full SSO; the teams-dev skill does. Rewrote the section accordingly
azure-configuration.mdx:
- Drop jq dependency (not in Requirements); use az --query "[tenant, password]" -o tsv with IFS read; quote $variables to avoid word-splitting
DocItem/Layout/index.tsx:
- Handle navigator.clipboard rejection (insecure context, blocked permissions, older browsers); feature-detect navigator.clipboard; show "Copy failed" state with red styling
- Add type="button" so the button can't accidentally submit a parent form
docusaurus.config.ts:
- Announcement bar uses ${baseUrl}cli/ template literal instead of hardcoded /teams-sdk/cli/
static-pages.mdx:
- Typo: straight-forward → straightforward
user-authentication/csharp.incl.md:
- The `graph` template doesn't exist for C# (#2736). Use the echo template and link to the issue; the OAuth wiring code below covers the manual setup
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Thanks for the careful review — sorry for the misses. Pushed heyitsaamir's comments on quickstart-register.md:
rido-min — #2736 (graph template missing for C#):
heyitsaamir — sso-setup.mdx:
Copilot HIGH:
Copilot NIT:
Copilot suggestion:
Also dropped the explicit Build is green. I owe you a more disciplined verification pass on next docs PRs — I claimed end-to-end verification last time and clearly didn't do it for the install-link command or the Python scaffold. Going forward I'll actually run every command in the doc against a real environment before claiming it works. |
Surfaced during pre-publish verification: the Azure CLI snippets in azure-configuration.mdx use bash-only syntax (`\` line continuations, `IFS=$'\t' read`, `<<<` here-strings) that won't run cleanly in PowerShell. Add a `:::note` callout pointing Windows users to WSL or Git Bash, and noting the PowerShell equivalents. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
||
| If you don't have an agent yet, step 3 scaffolds one using the Teams SDK. If you already have a server, skip step 3 and pass your endpoint to step 4. | ||
|
|
||
| :::tip Let your AI assistant do this for you |
There was a problem hiding this comment.
One thing is that this CLI sets up a bot with secrets automatically. For UMI / Fed Creds, I think we'll need to update this guide. Will think about this tomorrow.
| ::: | ||
|
|
||
| <Tabs> | ||
| <TabItem value="portal" label="Azure Portal"> |
There was a problem hiding this comment.
Something that needs checking - if an app registration is created in azure, how does TDP ever now about it? This is mainly only needed for store publishing.
| </TabItem> | ||
| <TabItem value="cli" label="Azure CLI"> | ||
|
|
||
| ```bash |
There was a problem hiding this comment.
NIT: for all the bash commands, we need to also provide powershell commands
| To test your app in Teams you need, at minimum, a provisioned bot. You'll likely also have other resources such as storage. | ||
|
|
||
| - For local development and prototyping: run `teams app create` (Teams-managed bot, no Azure subscription required) — see the [Quickstart: Register your app](../get-started/quickstart-register). | ||
| - For production with Azure: run `teams app create --azure --resource-group <rg>`, or follow the [Azure Configuration](./azure-configuration) guide for a manual setup. |
There was a problem hiding this comment.
they can run bots in production even if they're teams -managed right? the wording is a bit misleading here i think.
There was a problem hiding this comment.
@umangsehgal one config page detailing out azure vs tdp vs atk vs cli.
and consider multiple pages
| ## Regenerating the App Package | ||
|
|
||
| After updating the manifest, you need to zip the manifest and icon files into an app package: | ||
| After updating the manifest, zip the manifest and icon files into an app package. |
There was a problem hiding this comment.
Should we make this a dedicated command? It's pretty trivial to do that.
…rt step 4 Agent-Logs-Url: https://github.com/microsoft/teams-sdk/sessions/2e49016c-3d93-4af8-aa23-c833ddd4da19 Co-authored-by: umangsehgal <3513186+umangsehgal@users.noreply.github.com>
…ption mentions Agent-Logs-Url: https://github.com/microsoft/teams-sdk/sessions/4394dbd4-e4bd-426d-80eb-c2b3da308b6e Co-authored-by: umangsehgal <3513186+umangsehgal@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/teams-sdk/sessions/c96a1aa5-4f74-49a4-9a62-07cab28a47a7 Co-authored-by: umangsehgal <3513186+umangsehgal@users.noreply.github.com>
Two pages incorrectly framed Azure-managed bot registrations as "required for production". The only actual forcing function is OAuth/SSO (because OAuth connection management lives in Azure Bot Service). Many production bots run as Teams-managed. And the choice isn't permanent; `teams app bot migrate` upgrades a Teams-managed bot to Azure later without changing credentials. - core-concepts.md: rewrite "Provisioning and Deployment" so OAuth/SSO is the trigger for Azure, not "production". Surface migrate as the safety valve. - cli/concepts/bot-locations.md: rewrite "Choosing a Location" table to drop the "Production = Azure" row, add a clarifying intro paragraph, and fix the Teams-managed pros line that implied dev-only fit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The page jumped straight into procedure with vague framing about "production" and "explicit control", which left readers (and coding agents) unsure whether this page applied to them. Replace the intro and tip callout with a concrete list of cases where the manual Azure path is actually the right choice (existing Entra app, tenant policy, locked-down environments, learning what `--azure` does under the hood). For everything else, default to `teams app create --azure --resource-group <rg>`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds /teams/setup-paths as the canonical entry point for "which tool and bot location should I use?". Documents both real axes (Teams-managed vs Azure, and CLI vs ATK vs manual) with a TL;DR, decision matrix, and collapsible per-tool details that link to the existing detail pages. Hides azure-configuration from the sidebar via sidebar_class_name + CSS. The page still builds, is searchable, and is linked from Setup Paths' Manual Azure section. Updates teams/README.md to lead with Setup Paths and demote Azure Configuration to a "see also" link for niche cases. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop the "Two questions to answer" wrapper section and meta-narrative
("looks like four competing tools, but..."). Promote the two sub-headers
to h2 so the outline is flat and the content speaks for itself.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Teams CLI Preview launch blog post commits were initially landed on this branch. They have been moved to docs/teams-cli-preview-blog (PR #2796) for separate review. Reverting here so #2786 contains only the docs refresh work it was opened for. Reverts: 7148f6d, 0910df8, 9361376 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
||
| ## Choosing a Location | ||
|
|
||
| The only thing that forces an Azure-managed bot is **OAuth or SSO** (because OAuth connection management lives in Azure Bot Service). Production by itself is not a reason to switch — many production bots run fine as Teams-managed. And the choice isn't permanent: `teams app bot migrate` upgrades a Teams-managed bot to Azure later without changing your credentials. |
There was a problem hiding this comment.
I feel like, I'm not 100% sure about this. This is what we think are the main differences, but there could be others?
There was a problem hiding this comment.
I think copilot is being a lil extra here.
There was a problem hiding this comment.
Trimmed in 76d6c1c. Replaced the verbose paragraph with one sentence and collapsed the 6-row table to 3 rows (prototyping/dev → Teams-managed, need OAuth/SSO → Azure, no subscription → Teams-managed).
| | Production bot that doesn't need OAuth/SSO | Teams-managed | | ||
| | Tenant policy requires registration in your Azure subscription | Azure | |
There was a problem hiding this comment.
Removed in 76d6c1c — the "production without OAuth" and "tenant policy" rows are gone from the table.
| This page walks through creating the Entra App Registration and Azure Bot Service resource by hand. As described in [Core Concepts](./core-concepts), those two pieces are what every Azure-managed Teams bot needs. | ||
|
|
||
| As described in [Core Concepts](./core-concepts), the two pieces required for a bot are an **App Registration** and an **Azure Bot**. | ||
| :::tip Most readers should use the Teams CLI instead |
There was a problem hiding this comment.
We should plug the skill here imo. wdyt?
There was a problem hiding this comment.
@copilot in the tip plug in agent skills
There was a problem hiding this comment.
Done in 76d6c1c. Added "Or use the teams-dev agent skill — tell your AI assistant to set up your Teams bot and it handles everything automatically." to the tip.
| - For deployment to App Service, Container Apps, or other Azure compute, see the Microsoft Learn [deployment overview](https://learn.microsoft.com/en-us/microsoftteams/deploy-overview). No newline at end of file | ||
| The fastest path is `teams app create`, which provisions a Teams-managed bot by default — no Azure subscription required. See the [Quickstart: Register your app](../get-started/quickstart-register). | ||
|
|
||
| If you need OAuth or SSO (typically for delegated Microsoft Graph access on behalf of a user), the bot must be Azure-managed. Either start with `teams app create --azure --resource-group <rg>`, or start Teams-managed and switch later with `teams app bot migrate <appId> --resource-group <rg>` — your `CLIENT_ID`, `CLIENT_SECRET`, and `TENANT_ID` stay the same. For a hand-rolled Azure setup, follow the [Azure Configuration](./azure-configuration) guide. |
There was a problem hiding this comment.
i believe the migrate command needs the subscription as well.
There was a problem hiding this comment.
Confirmed in c80b4c3. Checked migrate.ts line 118: resolveSubscription() is always called (uses Azure CLI default interactively, or requires --subscription <id> in non-interactive mode). Updated the example to teams app bot migrate <appId> --subscription <id> --resource-group <rg> and added "(both require an Azure subscription)" to make it explicit.
|
|
||
| # Setup Paths | ||
|
|
||
| There are two real choices to make before you provision a Teams bot. Get them right and the rest is mechanical. |
There was a problem hiding this comment.
"before you provision a teams bot" - not true. you don't need to make this complicated decision until later... I'm not totally sure, but i feel like this is a heavy doc so early to set up the bot. thoughts?
…iguration tip Agent-Logs-Url: https://github.com/microsoft/teams-sdk/sessions/84f08ff6-2107-438c-a6ed-3df89a1aee2c Co-authored-by: umangsehgal <3513186+umangsehgal@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/teams-sdk/sessions/98053320-e6e9-4425-a00b-df8ed08045fc Co-authored-by: umangsehgal <3513186+umangsehgal@users.noreply.github.com>
Summary
Brings the docs site in line with the published Teams CLI v2.1 Preview, replaces ATK-as-primary framing with the CLI flow throughout, and adds dedicated quickstarts for registering and building a bot. Supersedes #2745 (which was written before the CLI was published).
teams-devskillteams project newfor each language); tab choice persists viagroupId="language"/cli/; announcement bar pivoted to "Teams CLI is in Preview"; soft fix on per-language sidebars (Essentials/In-Depth Guidescollapsed by default);agent-skillsmoved into CLI Getting Startedteams/configuration/(agents-toolkit + manual-configuration); addsteams/azure-configuration.mdxas the manual fallback with the CLI as the recommended path; reframescore-concepts,manifest,code-basics,static-pages, andenabling-in-copilotrunning-in-teamsleads with the CLI flow (ATK retained as alternative); drops every stale CLI invocation (npx ... new,config add atk.basic/atk.oauth,--atkflag)commands/index.md(added-y, --yes, removed dead--disable-auto-update, removed misleadingnewalias); correctedauthentication.md(browser flow by default, not device code); fixed broken#troubleshooting-sso→#troubleshootinganchor; replaced incomplete# TODO: add oauthpermission settingsbash insso-setup.mdxwith a pointer to the complete CLI guideDocItem/Layout(respectsllms: ignorefrontmatter)teams/user-authentication/_category_.json,Teams Toolkit→Microsoft 365 Agents Toolkitreferences in code commentsBuild is green with zero broken anchors.
Test plan
npm run docs:buildfrom repo root — expect SUCCESS, no broken-link or broken-anchor warningsnpm run docs:devand walk the new Get Started flow:/welcome— links to two quickstarts, no brokennpx ... newsnippets/get-started/quickstart-register— Step 5 has language tabs (TS / C# / Python); skill-hook callout near the top; "Copy for LLM" button visible/get-started/quickstart-build— switching tab persists across pages (try clicking C#, navigate to quickstart-register, confirm Step 5 defaults to C#)/cli/getting-started/agent-skillsappears in CLI sidebar under Getting StartedlocalStorage.docusaurus.announcement.dismissif dismissed previously)/teams/azure-configurationrenders;/teams/configuration/...404steams login(browser flow by default),teams project new typescript echo-bot,teams app create --teams-managed --env .env,teams app get --install-linkall work end-to-end on a real tenant🤖 Generated with Claude Code