Skip to content

docs(add-teams): document Teams CLI as an auto credentials path#2592

Merged
gavrielc merged 3 commits into
nanocoai:mainfrom
mmahmed:docs/add-teams-cli-path
May 22, 2026
Merged

docs(add-teams): document Teams CLI as an auto credentials path#2592
gavrielc merged 3 commits into
nanocoai:mainfrom
mmahmed:docs/add-teams-cli-path

Conversation

@mmahmed

@mmahmed mmahmed commented May 22, 2026

Copy link
Copy Markdown
Contributor

Type of Change

  • Feature skill - adds a channel or integration (source code changes + SKILL.md)
  • Utility skill - adds a standalone tool (code files in .claude/skills/<name>/, no source changes)
  • Operational/container skill - adds a workflow or agent skill (SKILL.md only, no source changes)
  • Fix - bug fix or security fix to source code
  • Simplification - reduces or simplifies source code
  • Documentation - docs, README, or CONTRIBUTING changes only

Description

What

Adds @microsoft/teams.cli as an "Auto" credential path in .claude/skills/add-teams/SKILL.md, alongside the existing Azure Portal manual path. Step 1–7 of the manual path are untouched.

Why

The existing manual path requires three things from Azure that block users on locked-down corporate tenants:

  1. An Azure subscription (the N/A(tenant level account) Entra-only placeholder isn't enough)
  2. Contributor role on that subscription (or on a specific resource group)
  3. The Microsoft.BotService resource provider registered on that subscription

For users issued an Entra identity without Azure RBAC (common in enterprise tenants), the manual path errors out at az provider register --namespace Microsoft.BotService with AuthorizationFailed and there's no documented alternative.

@microsoft/teams.cli registers the bot through the Teams Developer Portal instead of Azure Bot Service. It still produces an Entra app, client secret, and bot registration — the three values the existing Chat SDK Teams adapter consumes — but skips the Azure subscription requirement entirely.

How

Two H3 sections under ## Credentials:

  • ### Auto: Teams CLI — 4 imperative steps: install CLI, teams login, teams app create, Install in Teams. The CLI prints credentials as CLIENT_ID / CLIENT_SECRET / TENANT_ID; the skill includes the mapping to NanoClaw's TEAMS_APP_ID / TEAMS_APP_PASSWORD / TEAMS_APP_TENANT_ID inline at step 3.
  • Existing ### Step 1: ... through ### Step 7: ... headings unchanged. A short transition line above Step 1 marks them as the manual Azure Portal path.

Both paths hand off to the existing ### Configure environment section to write .env and run the container sync.

How it was tested

Verified end-to-end on a real Microsoft 365 corporate tenant with no Azure subscription (the exact scenario the manual path can't satisfy):

  • npm install -g @microsoft/teams.cli@previewteams loginteams status confirmed sideloading enabled
  • teams app create --name "NanoClaw" --endpoint "<tunnel>/api/webhooks/teams" succeeded; CLI created the Entra app, generated a client secret, registered the bot, and printed CLIENT_ID / CLIENT_SECRET / TENANT_ID to stdout
  • The printed values, mapped to TEAMS_APP_*, were written to .env; the existing mkdir -p data/env && cp .env data/env/env sync line worked unchanged
  • Diff isolation verified: PR contains only .claude/skills/add-teams/SKILL.md (+41 / -0 across two commits)

Re-verified on a fresh clone at ~/nanoclaw-new by running /add-teams in Claude Code on the PR branch:

  • Install section executed: git fetch origin channels, copied src/channels/teams.ts, appended import './teams.js' to src/channels/index.ts, ran pnpm install @chat-adapter/[email protected]
  • Auto path executed: teams app create --name "NanoClaw" --endpoint "https://<tunnel>/api/webhooks/teams" provisioned a fresh Entra app + client secret + bot registration; the returned values were mapped per the SKILL.md to TEAMS_APP_ID / TEAMS_APP_PASSWORD / TEAMS_APP_TENANT_ID and written into .env; mkdir -p data/env && cp .env data/env/env synced to the container

For Skills

  • SKILL.md contains instructions, not inline code (code goes in separate files)
  • SKILL.md is under 500 lines
  • I tested this skill on a fresh clone

mmahmed added 2 commits May 22, 2026 22:48
- @microsoft/teams.cli registers bots via the Teams Developer Portal, skipping the Azure subscription requirement that blocks users on locked-down corporate tenants
- teams app create prints CLIENT_ID/CLIENT_SECRET/TENANT_ID; the existing Configure environment section expects TEAMS_APP_ID/TEAMS_APP_PASSWORD/TEAMS_APP_TENANT_ID, so without the mapping a user pasting verbatim would silently end up with an adapter that can't authenticate
@github-actions github-actions Bot added follows-guidelines PR was created using the current contributing template PR: Docs Documentation changes labels May 22, 2026
@mmahmed mmahmed changed the title docs(add-teams): add CLI path as auto setup option docs(add-teams): document Teams CLI as an auto credentials path May 22, 2026
@github-actions github-actions Bot added the PR: Skill Skill package or skill-related changes label May 22, 2026
@gavrielc gavrielc merged commit b6d5f76 into nanocoai:main May 22, 2026
@gavrielc

Copy link
Copy Markdown
Collaborator

@mmahmed Thanks for the contribution!

@mmahmed mmahmed deleted the docs/add-teams-cli-path branch May 25, 2026 22:38
tamasPetki pushed a commit to tamasPetki/nanoclaw that referenced this pull request Jun 4, 2026
docs(add-teams): document Teams CLI as an auto credentials path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

follows-guidelines PR was created using the current contributing template PR: Docs Documentation changes PR: Skill Skill package or skill-related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants