Skip to content

Fix Teams SDK templates and quickstart docs across all languages#2910

Merged
heyitsaamir merged 9 commits into
mainfrom
heyitsaamir-crispy-pancake
Jul 6, 2026
Merged

Fix Teams SDK templates and quickstart docs across all languages#2910
heyitsaamir merged 9 commits into
mainfrom
heyitsaamir-crispy-pancake

Conversation

@heyitsaamir

Copy link
Copy Markdown
Collaborator

Summary

Fixes a bug report against the C# quickstart and, more broadly, verifies every scaffolding template and quickstart doc across C#, TypeScript, and Python by scaffolding each with the real CLI and building/typechecking against the real SDKs.

Bug report (C# quickstart)

  • Compile bug: context.Typing(cancellationToken)Typing's first positional param is string? text, so this fails to compile (CS1503). Fixed with a named argument.
  • Naming mismatch: docs said Quote.Agent but the CLI's pascalCase produces QuoteAgent. Docs corrected.
  • .NET version: docs said .NET 8; updated to .NET 10.
  • Playground auth failures: the default app rejects unauthenticated requests, which is why the M365 Agents Playground fails against a fresh agent. Documented enabling skipAuth for local dev.

Template fixes (all verified from a fresh scaffold + build/typecheck)

  • C# echo: Typing named-argument fix.
  • TS echo & graph: added "skipLibCheck": true — the @microsoft/teams.apps .d.ts imports express without bundling @types/express, causing TS7016 in consumers.
  • TS tab: added @types/react + @types/react-dom; scoped tsconfig.node.json to src/index.ts and added skipLibCheck so it stops typechecking client .tsx files.

Quickstart doc fixes

  • C#: naming + .NET version.
  • TypeScript: replaced stale nodemon/ts-node console output with the actual tsx output.
  • Python: added the missing venv + pip install -e . step.
  • Removed stale manifest/appPackage scaffold claims across 8 doc files — manifest generation is handled by the CLI (app create builds it in-memory and imports to TDP), not scaffolded into projects.
  • Added skipAuth playground guidance to all three quickstarts as GitHub-style > [!WARNING] alerts (local-dev-only):
    • TypeScript: new App({ skipAuth: true })
    • Python: App(skip_auth=True)
    • C#: builder.AddTeams(skipAuth: true)

Notes

  • Each skipAuth option was verified to exist in its SDK; the C# form was compile-verified.
  • Despite a misleading "Bot will accept unauthenticated requests" startup warning, C#'s authorization policy also rejects all requests without credentials unless skipAuth is set — same effective behavior as TS/Python. (Tracking the misleading warning text separately upstream in microsoft/teams.net.)
  • CLI test suite passes (206 tests).

🤖 Generated with Copilot CLI

heyitsaamir and others added 4 commits July 6, 2026 10:31
…t docs

- csharp/echo: fix CS1503 — Typing(cancellationToken) bound the token to the
  string? text param; use named arg Typing(cancellationToken: cancellationToken)
- typescript/echo,graph,tab: add skipLibCheck so the SDK's own express-importing
  .d.ts files don't surface errors in editors/tsc
- typescript/tab: add @types/react + @types/react-dom (were missing) and scope
  tsconfig.node.json to src/index.ts so it stops type-checking the React client
- docs(csharp quickstart): correct QuoteAgent naming (was Quote.Agent) and bump
  prerequisite to .NET 10 to match the template's net10.0 target
- docs(typescript quickstart): replace stale nodemon/ts-node console output with
  the actual tsx dev output
- docs(python quickstart): add the missing venv + pip install -e . step so
  'python src/main.py' doesn't fail with ModuleNotFoundError

Verified: all six templates (cs echo; ts echo/graph/tab; py echo/graph) build /
type-check cleanly from a fresh scaffold. CLI test suite passes (206).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The CLI no longer scaffolds a manifest.json/appPackage into new projects —
the manifest + icons are generated on demand by the CLI (app create builds
the package zip in-memory and imports it to TDP). Remove the outdated
'project new creates your manifest files' claims from the getting-started
quickstart + code-basics docs and the user-authentication guides, and drop
the appPackage/ entries from the project-structure trees. Also fix the C#
code-basics tree to use QuoteAgent/ (was Quote.Agent/).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The default App rejects unauthenticated requests, which is why the M365
Agents Playground fails against a freshly scaffolded agent. Document
enabling skipAuth for local dev in all three quickstarts:
- TypeScript: new App({ skipAuth: true })
- Python: App(skip_auth=True)
- C#: builder.AddTeams(skipAuth: true)

Verified each option exists in its SDK and that the C# form compiles.
Note: despite a misleading 'will accept unauthenticated requests' warning,
C#'s authorization policy also rejects all requests without credentials
unless skipAuth is set — same effective behavior as TS/Python. Each note
warns against using skipAuth in production.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 6, 2026 18:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Teams SDK CLI templates and docs to reflect current scaffolding behavior and to ensure fresh-scaffold projects build/typecheck across C#, TypeScript, and Python.

Changes:

  • Docs: remove stale “appPackage/manifest scaffolded into project” claims; refresh quickstart steps/output; add skipAuth/skip_auth playground guidance; add Python venv install step; update C# naming/.NET version.
  • Templates: fix C# Typing(...) call-site; adjust TS template tsconfigs and tab devDeps for smoother typechecking.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
teams.md/src/components/include/in-depth-guides/user-authentication/typescript.incl.md Removes outdated manifest/appPackage scaffolding claim.
teams.md/src/components/include/in-depth-guides/user-authentication/python.incl.md Removes outdated manifest/appPackage scaffolding claim.
teams.md/src/components/include/getting-started/quickstart/typescript.incl.md Updates TS quickstart console output; adds skipAuth playground guidance.
teams.md/src/components/include/getting-started/quickstart/python.incl.md Adds venv + editable install step; adds skip_auth playground guidance.
teams.md/src/components/include/getting-started/quickstart/csharp.incl.md Updates .NET prerequisite and generated folder name; adds skipAuth playground guidance.
teams.md/src/components/include/getting-started/code-basics/typescript.incl.md Removes appPackage from the example project structure.
teams.md/src/components/include/getting-started/code-basics/python.incl.md Removes appPackage from the example project structure.
teams.md/src/components/include/getting-started/code-basics/csharp.incl.md Updates C# project structure to match CLI naming and removes appPackage mention.
packages/cli/templates/typescript/tab/tsconfig.node.json Narrows node tsconfig scope and enables skipLibCheck for template stability.
packages/cli/templates/typescript/tab/package.json.hbs Adds React type packages needed for TSX typechecking.
packages/cli/templates/typescript/graph/tsconfig.json Enables skipLibCheck in the graph agent TS template.
packages/cli/templates/typescript/echo/tsconfig.json Enables skipLibCheck in the echo agent TS template.
packages/cli/templates/csharp/echo/{{name}}.hbs/Program.cs.hbs Fixes Typing(...) call to use a named cancellation token argument.

Comment thread teams.md/src/components/include/getting-started/quickstart/typescript.incl.md Outdated
Comment thread teams.md/src/components/include/getting-started/quickstart/python.incl.md Outdated
Comment thread teams.md/src/components/include/getting-started/quickstart/csharp.incl.md Outdated
heyitsaamir and others added 4 commits July 6, 2026 12:22
The manifest cleanup left the C# code-basics project-structure-description
section empty (it only described the removed appPackage/), failing the
docs content-gap check in production. Describe Program.cs instead.

Also fix the same context.Typing(cancellationToken) compile bug in the
code-basics and adaptive-cards C# samples (first positional param is
string? text), plus a context.activity -> context.Activity casing error.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The playground page told users to leave CLIENT_ID/SECRET/TENANT unset and
claimed the bot would then accept unauthenticated requests. That's wrong:
the SDK rejects all requests when no credentials are configured, which is
exactly why the playground fails against a fresh agent. Document enabling
skipAuth (per-language tabs) and correct the stale startup-warning quote.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Docusaurus renders :::warning admonitions; switch the skipAuth
production-safety notes in the quickstarts and the agents-playground page
from GitHub-style alert syntax to :::warning.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The presence or absence of CLIENT_ID/SECRET/TENANT is beside the point;
what matters is skipAuth. Simplify to state the SDK rejects unauthenticated
requests by default.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@heyitsaamir heyitsaamir requested a review from Copilot July 6, 2026 19:39
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Comment thread teams.md/docs/main/developer-tools/agents-playground/README.md
@heyitsaamir heyitsaamir merged commit 58f89c7 into main Jul 6, 2026
3 checks passed
@heyitsaamir heyitsaamir deleted the heyitsaamir-crispy-pancake branch July 6, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants