100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Microsoft 365

Teams Toolkit and Dev Environment Setup

Setting up a local development environment for building Microsoft Teams apps using Teams Toolkit, the Teams JS SDK, and app manifests.

FoundationsIntermediate9 min readJul 10, 2026
Analogies

Teams Toolkit and Dev Environment Setup

Teams Toolkit is Microsoft's official extension (available for Visual Studio Code and Visual Studio) for scaffolding, running, debugging, and deploying Teams apps; it generates a project with a pre-filled app manifest, provisions the necessary Azure resources (Bot Service, App Service, or Static Web Apps depending on the template), and wires up local debugging so an app running on localhost can be sideloaded into a real Teams client via a secure tunnel.

🏏

Cricket analogy: Similar to how a franchise's pre-season setup crew prepares the pitch, sets up the practice nets, and arranges scrimmage matches before the real tournament starts, just as Teams Toolkit scaffolds, provisions, and debugs an app before real deployment.

Prerequisites and Project Scaffolding

Before scaffolding an app you need Node.js (LTS version), the Teams Toolkit extension itself, and either a Microsoft 365 developer tenant (free via the Microsoft 365 Developer Program) or access to an existing tenant with sideloading enabled; running the 'Create a New App' command in the extension lets you pick a capability — Tab, Bot, Message Extension, or a combination — and a language (JavaScript, TypeScript, or C#), then scaffolds a working project with a teamsapp.yml lifecycle file describing provision, deploy, and publish stages.

🏏

Cricket analogy: Similar to how a young cricketer needs proper kit, registration with a club, and a coach's assessment before being assigned a batting or bowling specialization, just as a developer needs Node.js, the extension, and a tenant before picking an app capability.

Local Debugging and Sideloading

Local debugging works by running your app on localhost, exposing it through a dev tunnel (Microsoft's devtunnel CLI or ngrok in older setups), and launching a Teams web client pointed at that tunnel URL with a debug manifest that Teams Toolkit generates automatically from your manifest.json template and .env file, so you can set breakpoints in VS Code and see them hit as you interact with the app inside real Teams UI.

🏏

Cricket analogy: Similar to how a bowler tests a new delivery in the nets with a coach watching closely for flaws before trying it in a real match, just as a developer tests locally with breakpoints before deploying live.

yaml
provision:
  - uses: teamsApp/create
    with:
      name: my-teams-app-${{TEAMSFX_ENV}}
  - uses: aadApp/create
    with:
      name: my-teams-app-aad-${{TEAMSFX_ENV}}
deploy:
  - uses: cli/runNpmCommand
    with:
      args: run build
json
{
  "manifestVersion": "1.19",
  "id": "${{TEAMS_APP_ID}}",
  "name": { "short": "My Teams App" },
  "bots": [{ "botId": "${{BOT_ID}}", "scopes": ["personal", "team"] }]
}

The .env.local and .env.dev files generated by Teams Toolkit hold environment-specific values like AAD app IDs and bot IDs — never commit these files with real secrets to source control; Teams Toolkit's default .gitignore already excludes them.

Provisioning and Publishing to a Tenant

Moving from local debugging to a shared environment involves running the Toolkit's 'Provision' stage, which creates the real Azure and Entra ID resources for a target environment (like 'dev' or 'prod'), followed by 'Deploy' to push code, and finally 'Publish' which uploads the app package to the organization's Teams app catalog for an admin to approve in the Teams admin center before other users can install it.

🏏

Cricket analogy: Similar to how a new stadium must be built, inspected, and then certified by the cricket board before it can host an official international match, just as an app is provisioned, deployed, and then approved by an admin before general use.

Provisioning against the wrong environment file (e.g., running against .env.prod while testing) can create duplicate Azure resources and bot registrations billed to production — always check the active environment shown in the Teams Toolkit sidebar before running Provision.

  • Teams Toolkit scaffolds, debugs, provisions, and publishes Teams apps from VS Code or Visual Studio.
  • A Microsoft 365 Developer Program tenant provides a free sandbox for building and sideloading apps.
  • Local debugging relies on a dev tunnel exposing localhost to a real Teams client.
  • teamsapp.yml defines the provision/deploy/publish lifecycle stages declaratively.
  • manifest.json declares the app's identity, capabilities, and required permissions.
  • .env files hold environment-specific secrets and should never be committed to source control.
  • Publishing uploads the app package to the org's Teams app catalog, where an admin must approve it.

Practice what you learned

Was this page helpful?

Topics covered

#Microsoft365#MicrosoftTeamsDevelopmentStudyNotes#MicrosoftTechnologies#TeamsToolkitAndDevEnvironmentSetup#Teams#Toolkit#Dev#Environment#StudyNotes#SkillVeris