tm1cm · Walkthrough 2 of 5
Log in to TM1
tm1cm logs in the way your server wants, and asks for what it needs rather than keeping it in a file. You see what happens without a password, and how to give one for a single run.
How tm1cm works out the login
- TM1's own security: a user and a password. With no password in
credentials.yaml, tm1cm asks for it when it connects, and again when TM1 refuses it, up to three times. A user whose password is empty is logged in without being asked. - CAM with a password (LDAP, Active Directory): the same, with
namespaceset. Without one, tm1cm asks Cognos for its namespaces and lets you pick. - CAM through a browser (OpenID Connect through Entra ID, Okta, Keycloak and the like, or SAML): set
namespace, and tm1cm opens your namespace's own login in a browser window (Chrome, Edge, Brave or Chromium, with a profile of its own), and logs in with the passport Cognos gives it. While your provider remembers you, no window is needed. - A CAM passport you already have:
cam_passportwithbase_urlis all it needs. A passport expires. - Windows single sign-on through a CAM gateway:
gateway.
Every setting is in the connection settings, and auth says which way to log in when tm1cm shouldn't work it out.
Steps
Leave the password out of
credentials.yaml:config/default/credentials.yaml
user: adminRun tm1cm. In a terminal it asks for the password. Here it has no terminal to ask in (as in a scheduled job), so it tries the empty password, and TM1 refuses it. The message says what to check, and the exit code is 4:
Terminal
tm1cm --mode get --environment test < /dev/nullOutputexit code 4
… 10 lines before tm1cm: TM1 refused the login for admin at http://localhost:8011. Check user and password in credentials.yaml. The full report is in ~/projects/sales/sales.log. Attach it if you report an issue at https://github.com/ajmyers/tm1cm/issuesPowerShell
$null | tm1cm --mode get --environment testOutput, as on macOSexit code 4
… 10 lines before tm1cm: TM1 refused the login for admin at http://localhost:8011. Check user and password in credentials.yaml. The full report is in ~/projects/sales/sales.log. Attach it if you report an issue at https://github.com/ajmyers/tm1cm/issuesGive a setting for one run with
--connect KEY=VALUE(or-c), once for each. It wins overconnect.yamlandcredentials.yaml, for any setting:Terminal
tm1cm --mode get --environment test -c password=appleOutput
… 153 lines before 2026-01-01 09:00:00,000 - main - main(75) - INFO - Performing operation UPDATE_VIEW: }MS_SalesCube_metrics}_World Sales Strategy:All 2026-01-01 09:00:00,000 - main - main(75) - INFO - Performing operation UPDATE_VIEW: }MS_SalesCube_metrics}_World Sales Strategy:MS_SalesCube_metrics}_World Sales Strategy 2026-01-01 09:00:00,000 - skipcheck_tm1 - close(400) - INFO - Closed TM1 session 9 at http://localhost:8011/api/v1/A password given this way can end up in your shell's history: in a terminal, leave it out and type it when asked.
Signing in through the browser
- A hidden window is tried first. When your provider needs you, a window opens, and tm1cm says so.
- Without a terminal, or on Linux without a display, only the hidden window is tried, and if that isn't enough the message says what to set instead.
- If the browser can't sign you in, tm1cm offers a user and password (for a namespace that takes one), pasting a CAM passport, trying again, or cancelling.
- The browser's profile is tm1cm's own, in your user cache folder, never your own browser's.
What's next
Run tm1cm unattended, where there's nobody to ask, or promote a change with git.
Next
- Promote a change with git: Commit the model, change it, review the change, and put exactly that commit on the next server.
All the settings, filters, options and exit codes are in the reference.