Skip to main content

teams app doctor

Run diagnostic checks on a Teams app

Usage​

teams app doctor [appId] [options]

Arguments​

ArgumentDescriptionRequired
appIdApp IDNo

Options​

FlagDescription
--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
  • webApplicationInfo format is correct (if present)

SSO (only if webApplicationInfo is configured)

  • Identifier URI format is api://botid-{botId}
  • access_as_user scope exists
  • Teams desktop and web clients are pre-authorized
  • Bot Framework redirect URI is present
  • OAuth connection tokenExchangeUrl matches the identifier URI

Example​

teams app doctor <appId>

When to Use​

  • After app create to verify everything was set up correctly
  • After setting up SSO to confirm SSO wiring
  • After app bot migrate to check the new Azure bot
  • When debugging authentication or token issues