Authenticating to Jira using the command line
This topic describes how to authenticate to Jira Software using dmcli, the Dimensions CM command line. After registering credentials you can use Jira issues as external requests in Dimensions CM for current and future connection sessions until the Jira token is revoked, the password expires, or the user is locked.
Simple authentication
The easiest way to authenticate is to use a URL.
To use simple authentication:
- Log into the Dimensions CM command-line (dmcli) client using your CM credentials.
- Run a command that uses an external request, for example, deliver changes in response to a Jira issue. The command will fail to authenticate to Jira.
- In the command output, copy the URL.
- Paste the URL into a browser.
- Step through the Jira authentication process.
Registering Jira Cloud credentials
You can associate Jira Cloud user credentials with a Dimensions CM user.
To register Jira Cloud credentials:
- In your Atlassian account navigate to Account Settings > Security > API token > Create and manage API tokens.
- Create and save an API token.
- Log into the Dimensions CM desktop or command-line (dmcli) client using your CM credentials.
- Register the Jira Cloud credentials by running the following
AUTH
command: PASSWORD
is the Jira API token.IDM_TOOL
is the ID of the Jira request provider . Enter "." to register credentials against the provider associated with the current product.
AUTH /USER="<Jira username>" /PASSWORD="<Jira API token>" /IDM_TOOL="<Jira instance ID>"
where:
Tip: If the Jira user name is an email address use double @@ symbols, for example: jira@@user_name.com
Registering Jira Server credentials
If your Dimensions CM and Jira Server log in credentials are different, or you want to use a different Jira account for your CM user, you can register your Jira Server credentials using dmcli.
To register Jira Server credentials:
- Log into the Dimensions CM desktop or command-line (dmcli) client using your CM credentials.
- Register the Jira Server credentials by running the following
AUTH
command:
AUTH /USER="<Jira username>" /PASSWORD="<Jira password>" /IDM_TOOL="<Jira instance ID>"
where IDM_TOOL
is the ID of the Jira request provider . Enter "." to register credentials against the provider associated with the current product.
Unregistering Jira credentials
To unregister Jira Cloud and Server credentials, run this dmcli command:
AUTH /DELETE /IDM_TOOL="<Jira instance ID>"
or
AUTH /DELETE /IDM_TOOL=.
See also: