teams app doctor
Run diagnostic checks on a Teams app
Usage​
teams app doctor [appId] [options]
Arguments​
| Argument | Description | Required |
|---|---|---|
appId | App ID | No |
Options​
| Flag | Description |
|---|---|
--json | [OPTIONAL] Output as JSON |
Details​
Runs a comprehensive diagnostic check across your app's bot registration, AAD app, manifest, and SSO configuration. Reports pass/fail/warn/info for each check.
Check Categories​
Bot Registration
- Bot location detected (Teams-managed or Azure)
- Teams channel is enabled
- Messaging endpoint is reachable (HTTP probe)
AAD App
- AAD app exists and is accessible via Graph
- Client secret expiry status
- Sign-in audience is correct (
AzureADMultipleOrgs)
Manifest
- Bot ID in manifest matches the app's bot ID
- Endpoint domain is listed in
validDomains webApplicationInfoformat is correct (if present)
SSO (only if webApplicationInfo is configured)
- Identifier URI format is
api://botid-{botId} access_as_userscope exists- Teams desktop and web clients are pre-authorized
- Bot Framework redirect URI is present
- OAuth connection
tokenExchangeUrlmatches the identifier URI
Example​
teams app doctor <appId>
When to Use​
- After
app createto verify everything was set up correctly - After setting up SSO to confirm SSO wiring
- After
app bot migrateto check the new Azure bot - When debugging authentication or token issues