Log In to Tosca Cloud
Authenticate with Tosca Cloud using browser-based login.
Always use --json --silent on every toscactl command.
Steps
Check current config. Run
toscactl config --json --silent.Determine the URL.
- If
$ARGUMENTScontains a URL, use it directly — skip to step 3. - If the config output contains a tenant URL, show it to the user and ask: "Use this URL to log in:
<url>?"- If the user confirms, use that URL.
- If the user declines, ask them to provide a URL.
- If no URL is in the config, ask the user: "Enter your Tosca Cloud tenant URL (e.g.
tenant.my.tricentis.com):"
- If
Login. Run
toscactl login --url <URL> --json --silent.- Do not use
--headlessunless the user explicitly requests it — this opens the browser for PKCE authentication.
- Do not use
Confirm. Run
toscactl config --json --silentand report the authenticated tenant and active workspace.
Error Handling
- If login fails, suggest verifying the URL format (
tenant.my.tricentis.com) and network connectivity. - For CI/headless environments, mention that setting
TOSCA_CLIENT_IDandTOSCA_CLIENT_SECRETenvironment variables enables non-interactive authentication.