Quickstart
Create your first Teams bot app from scratch in under 5 minutes.
1. Log in
teams login
Follow the device code flow — open the URL, enter the code, sign in with your M365 account.
2. Create an app
Interactive mode — just run:
teams app create
The CLI will prompt you for a name and messaging mode, then handle AAD app registration, manifest generation, Teams app import, and bot registration. Choose Sockets for local bot development without a public endpoint or tunnel, or HTTP endpoint for a deployed endpoint or tunnel.
Scripted mode — create a socket-mode bot and save credentials:
teams app create --name "My Bot" --messaging-mode socket --env .env
Socket mode works with Teams-managed and Azure-managed bots, subject to the current availability and ownership requirements.
For HTTP delivery, pass a public HTTPS endpoint:
teams app create --name "My Bot" --messaging-mode http --endpoint https://mybot.azurewebsites.net/api/messages
This creates a Teams-managed bot (no Azure subscription needed). To use Azure instead:
teams app create --name "My Bot" --azure --subscription <id> --resource-group my-rg --endpoint https://mybot.azurewebsites.net/api/messages
3. Get your credentials
After creation, teams outputs:
CLIENT_ID=<your-app-client-id>
CLIENT_SECRET=<your-client-secret>
TENANT_ID=<your-tenant-id>
Save these to a credentials file automatically:
teams app create --name "My Bot" --env .env
For C# projects, use --env appsettings.json to write credentials under a Teams section with PascalCase keys.
4. View your app
List all your apps:
teams app list
View details of a specific app:
teams app get <appId>
5. Interactive mode
Just run teams app with no subcommand to enter the interactive menu. From there you can browse your apps, edit properties, manage manifests, and more.
teams app
Next Steps
- Update your app's properties — name, endpoint, messaging mode
- Download the manifest to customize it locally
- Set up SSO using the teams-dev skill or manual guide
- Understand bot locations — Teams-managed vs Azure