Environment Variables
| Variable | Purpose |
|---|---|
TEAMS_CLI_ACCESS_TOKEN | Use a pre-obtained Microsoft Graph access token instead of keyring lookup. |
TEAMS_CLI_CLIENT_ID | Entra app client ID. Takes precedence over the profile, and auth login never saves it. |
TEAMS_CLI_CLIENT_SECRET | Client secret for client credentials flow. Prefer it to --client-secret, whose value shows in process listings. |
TEAMS_CLI_TENANT_ID | Tenant ID or tenant domain. Takes precedence over the profile, and auth login never saves it. |
TEAMS_CLI_REDIRECT_URI | Loopback redirect URI for the browser login, auth consent-url and auth doctor (default http://localhost/callback on a free port). Takes precedence over the profile's redirect_uri, and auth login never saves it. |
TEAMS_CLI_CLIENT_STATE | Secret teams listen requires in each notification's clientState (same as --client-state, but kept out of process listings). |
TEAMS_CLI_SCOPES | Space-separated delegated Graph scopes for auth login, auth refresh, and auth consent-url. |
TEAMS_CLI_TOKEN_STORE | keyring (default) or file: where tokens are kept. file writes unencrypted 0600 files under the config directory's tokens/, for unattended processes and hosts without a keyring. Any other value is invalid input (exit code 2). See Token Caching. |
HTTPS_PROXY | Proxy for every HTTPS request; NO_PROXY lists hosts to reach directly. |
SSL_CERT_FILE / SSL_CERT_DIR | A PEM bundle, or a directory of PEM certificates, for a proxy that inspects TLS when its root CA is not in the OS store. On macOS and Windows they are trusted on top of the operating system's certificate store; on Linux they replace the system CA bundle (Mozilla's public roots stay built in). A bundle with no usable certificate is CONFIG_ERROR (exit code 10). See Common Errors. |
TEAMS_CLI_DISABLE_KEYRING | Test-only escape hatch used by CLI tests. |
TEAMS_CLI_BUILD_NAMESPACE | Build time only, read by cargo build: the storage namespace (keyring service and config directory) compiled into a source build. Defaults to teams-cli-dev for debug builds and teams-cli for release builds; must be teams-cli or teams-cli- plus lowercase letters, digits and hyphens. |
MS_TEAMS_CLI_VERSION | Docs build override for the sidebar release badge. |
TEAMS_CLI_ACCESS_TOKEN must be a Graph token. Tokens captured from the Teams client, including fossteams/teams-token files such as token-teams.jwt, have the wrong audience for Microsoft Graph and will fail with Invalid audience.