Excel Add-In for Jira Service Desk

Build 21.0.7930

Creating a Custom OAuth App

If you do not have access to the user name and API token or do not wish to require them, you can use OAuth authentication. Jira Service Desk uses the OAuth authentication standard, which requires the authenticating user to interact with Jira Service Desk via the browser. The add-in facilitates the OAuth exchange in various ways, as described in this section. Please note OAuth 2.0 is only supported for Jira Service Desk Cloud.

Create an OAuth App

To obtain the OAuth client credentials, consumer key, and consumer secret:

  1. Log in to your JIRA Service Desk Cloud site.
  2. Navigate to your app management (https://developer.atlassian.com/apps/).
  3. Select Create new app, then name the app. The app will now be created.
  4. If missing, add OAuth 2.0 functionality to your app by navigating to APIS AND FEATURES -> + Add -> Add OAuth 2.0 (3LO).
  5. From APIS AND FEATURES -> + Add, add the JIRA Service Desk platform REST API to your app. Please note that you also need to add the JIRA app to get all of the functionalities of the driver.
  6. From APIS AND FEATURES -> + JIRA Service Desk platform REST API, add the desired scopes to your app.
  7. You'll additionally need to set up your Callback URL. Navigate to APIS AND FEATURES -> OAuth 2.0 (3LO). Enter a URL that is accessible to your app and save the changes.

Authenticate to Jira Service Desk from a Desktop Application

After setting the following connection properties, you are ready to connect:

  • OAuthClientId: Set to the consumer key in your app details.
  • OAuthClientSecret: Set to the consumer secret in your app details.
  • CallbackURL: Set to the callback URL found in your app details under APIS AND FEATURES -> OAuth 2.0 (3LO).
  • InitiateOAuth: Set to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken connection property.
  • OAuthVersion: Set to 2.0.
  • Url: The URL to your JIRA Service Desk endpoint; for example, https://yoursitename.atlassian.net.

When you connect, the add-in opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The add-in then completes the following OAuth process:

  1. Gets the callback URL and sets the access token and oauthserverurl to authenticate requests.
  2. Saves OAuth values in OAuthSettingsLocation to be persisted across connections.
  3. Exchanges the returned refresh token for a new, valid access token.

Authenticate to Jira Service Desk from a Web Application

To obtain the access token, set the following connection properties:

  • OAuthClientId: Set to the consumer key in your app details.
  • OAuthClientSecret: Set to the consumer secret in your app details.
  • CallbackURL: Set to the callback URL in your app details under APIS AND FEATURES -> OAuth 2.0 (3LO).
  • Url: The URL to your JIRA Service Desk endpoint; for example, https://yoursitename.atlassian.net.
  • OAuthVersion: Set to 2.0.

When connecting via a web application, or if the add-in is not authorized to open a browser window, you need to exchange temporary verification values for the access token:

  1. Call GetOAuthAuthorizationURL. The stored procedure returns the URL to the OAuth endpoint.
  2. Log in and authorize the application. You are redirected back to the callback URL. If you set the GrantType parameter to Implicit, the callbackURL contains the OAuthAccessToken and oauthserverurl in a query string parameter. If you set the GrantType parameter to code, the callback URL contains the verifier code in the query string parameter named "code". Extract the verifier code and call GetOAuthAccessToken.

To connect to data, set the following connection properties:

  • OAuthAccessToken
  • OAuthVersion
  • OAuthClientId
  • OAuthClientSecret
  • OAuthAccessToken
  • Url

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 21.0.7930