This guide uses PowerShell.
teams --help
teams --versionFrom source:
cargo build
.\target\debug\teams.exe --helpDevice-code flow is recommended for first validation:
teams auth login --device-codeThen:
teams auth doctor --output json | ConvertFrom-Jsonteams config path --output json | ConvertFrom-JsonDefault Windows path:
%APPDATA%\teams-cli\config.toml
PowerShell session:
$env:TEAMS_CLI_TENANT_ID = "<tenant-id>"
$env:TEAMS_CLI_CLIENT_ID = "<client-id>"
teams auth login --device-codePersistent user variable:
[Environment]::SetEnvironmentVariable("TEAMS_CLI_TENANT_ID", "<tenant-id>", "User")teams user me --output json | ConvertFrom-Json
teams chat list --page-size 10 --output json | ConvertFrom-Jsonteams message send --chat $env:TEAMS_TEST_CHAT_ID --body "teams-cli Windows smoke test" --output jsonTokens are stored in Windows Credential Manager through the Rust keyring crate. If auth commands hang or fail:
- Run PowerShell as the same Windows user that performed login.
- Check Credential Manager for
teams-clientries. - Try
teams auth logout --all, then log in again. - Do not set
TEAMS_CLI_DISABLE_KEYRING=1for real use.
TEAMS_CLI_DISABLE_KEYRING=1 is only for tests that must avoid real OS credential storage.