Skip to content

teams app create ​

Create a new Teams app with bot

Usage ​

teams app create [options]

Options ​

FlagDescription
-n, --name <name>App/bot name
-e, --endpoint <url>[OPTIONAL] Bot messaging endpoint URL
--env <path>[OPTIONAL] Path to .env file to write credentials
--azure[OPTIONAL] Create bot in Azure (requires az CLI)
--teams-managed[OPTIONAL] Create bot managed by Teams (default)
--subscription <id>[OPTIONAL] Azure subscription ID (defaults to az CLI default)
--resource-group <name>Azure resource group (required for --azure)
--create-resource-group[OPTIONAL] Create the resource group if it doesn't exist
--region <name>[OPTIONAL] Azure region for resource group (default: westus2)
--color-icon <path>[OPTIONAL] Path to color icon (192x192 PNG)
--outline-icon <path>[OPTIONAL] Path to outline icon (32x32 PNG)
--json[OPTIONAL] Output as JSON

Details ​

Creates a complete Teams bot app in a single command: AAD app registration, client secret, manifest, Teams app import, and bot registration.

Bot Location ​

By default, the bot is Teams-managed (no Azure subscription needed). Use --azure to create an Azure Bot instead, which is required for OAuth and SSO features.

Precedence: --azure/--teams-managed flag > teams config default-bot-location > Teams-managed default.

See Bot Locations for details on the trade-offs.

Examples ​

Create with defaults (Teams-managed, generated manifest):

bash
teams app create --name "My Bot"

Create with Azure bot and write credentials to .env:

bash
teams app create --name "My Bot" --azure --resource-group my-rg --env .env

Output ​

On success, outputs:

CLIENT_ID=<app-client-id>
CLIENT_SECRET=<generated-secret>
TENANT_ID=<your-tenant-id>

Portal Equivalent ​

In the Teams Developer Portal, this is equivalent to: Apps → New app, then separately configuring bot registration and generating credentials. The CLI does it all in one step.