Skip to main content
Version: 2.5

Connections and authentication

Before you begin: complete Install and connect. Work from any directory. Use one environment per endpoint and one context per desired account/tenant combination.

tsm cli config environment add test --project tsm --endpoint https://tsm-test.example.com
tsm context create test --project tsm --env test --account personal --tenant default
tsm context use test --global
tsm --context dev auth whoami
tsm context list

Replace the test URL before connecting. Creating/selecting contexts stores no credentials and starts nothing. The final whoami deliberately uses dev, independent of the selected default.

Basic login:

tsm --context test auth login --method basic --user your-username

The password is prompted. API-key and Bearer login similarly support interactive prompts. Basic/API-key/tSM Bearer are implemented; general browser OAuth/PKCE/device SSO is not. An imported tSM token session can refresh only with its original supported client/target session metadata. Changing an environment URL requires logging in for the new endpoint; credentials are not automatically reused.

tsm auth status
tsm --context test auth logout

Expected: status shows project/environment/account plus contexts. It reads metadata only; use whoami for online verification. Logout removes the selected saved account locally, not remote API-key/browser-session revocation. Cleanup of the extra config: tsm context remove test, then tsm cli config environment remove test --project tsm.