API tokens

The app initially lacks access to certain Jira Cloud API functionalities because it does not request the ADMIN app scope during installation. Rather than ask for this scope, the app instead offers the ability for a user API token to be securely stored and used when such functionality is needed.

When is the token used?

The token is used for API operations that require the ADMIN app scope grant (which the app doesn’t have):

such as the ability to lookup user's by their email address (AC-1014). To workaround this limitation, JEMHC requires a pre-existing Jira user with appropriate permissions to be configured as a "workaround" user, JEMHC authenticates as this user to perform user lookup API requests that cannot be executed by the JEMHC app user.

Configuring a JEMHC Workaround User

To configure the Workaround User you will need the following information:

Once the above information has been gathered, you will then need to go to JEMHC > Workarounds > Admin Operations and enter the following information:

Allocating the Global BROWSE_USER permission (so JEMHC can lookup users by their email address)

In order for the Workaround user to be able to check if a user exists, they need to be allocated the Browse users and groups Global Permission. This is done within System > Security > Global Permissions, at the bottom of the screen there is a section to Grant Permission, pick the Browse users and groups, and nominate a restricted membership group, that your workaround user will be a member of:

Allocating the Global ADMINISTER permission (so JEMHC can create users)

In order for JEMHC to be able to create users, the global ADMINISTER permission is required to be held by the workaround user. Global Permissions are only allocated through groups:

  1. Navigate to System settings

  2. Check the “Administer Jira” Permission groups, the workaround user must be and remain a member of this group to prevent runtime failure to create users.

How to Generate an API Token

API tokens last a year and then expire, you will need to redo this every year.

API Tokens are user specific, which means that if you change the Workaround User then you would need to generate a new API token for that user.

Related Articles