# Atlassian Jira Application Integration Setup

### Getting started <a href="#getting-started" id="getting-started"></a>

BalkanID recommends creating a separate service account for the purposes of this integration, instead of using personal or employee named accounts.&#x20;

#### Requirements: <a href="#h_01hq2kade68stek6m9k306qae6" id="h_01hq2kade68stek6m9k306qae6"></a>

* ***Jira Personal Access Token (or) Service Account API Token***&#x20;
* ***Jira Site name***

### Connecting via Personal Access Token (Legacy Method) <a href="#steps-to-add-the-integration" id="steps-to-add-the-integration"></a>

#### Steps to obtain credentials <a href="#steps-to-add-the-integration" id="steps-to-add-the-integration"></a>

1. Ensure the Service account/user you are creating an API token with has the "Site administrator" role.&#x20;
2. Go to [Atlassian API tokens](https://id.atlassian.com/manage-profile/security/api-tokens).&#x20;
3. Choose **Create API token** (unscoped). You can give it a name and an expiry date.&#x20;

{% hint style="info" %}
**Note:** When entering Jira Personal Access Token in BalkanID, it should be formatted as `me@example.com:my-api-token`, using the email associated with the token.
{% endhint %}

4. Once created, copy the token and store it securely.
5. Get your site name from jira (for example, if your jira URL is  `https://YOUR-SITE.atlassian.net`, the site name is `YOUR-SITE` (e.g. `acme` for `https://acme.atlassian.net`).

### Connecting via Service Account Access Token <a href="#h_01ha5ctj53h7v6sccbwdv7pvnq" id="h_01ha5ctj53h7v6sccbwdv7pvnq"></a>

### Getting credentials from Jira Cloud

The extractor supports both **unscoped** and **scoped** API tokens. You only need **siteName** (or **orgName**) and **token** - the extractor auto-detects which API to use.

#### Create API token

1. Go to [Atlassian API tokens](https://id.atlassian.com/manage-profile/security/api-tokens)
2. Choose **Create API token** (unscoped) or **Create API token with scopes** (for least-privilege; see [checklist](https://github.com/balkanid/extractor-jira/blob/release-1/docs/JIRA_API_CREDENTIALS_CHECKLIST.md) for required scopes)
3. Copy the token and store it securely

#### Get your site name

From your Jira URL `https://YOUR-SITE.atlassian.net`, the site name is `YOUR-SITE` (e.g. `acme` for `https://acme.atlassian.net`).

#### Config format

```
{
  "appConfig": {
    "token": "your-email@company.com:your_api_token",
    "siteName": "your-site"
  }
}
```

* **token**: `EMAIL:API_TOKEN` (email of the Jira user + colon + API token)
* **siteName** or **orgName**: Site subdomain from your Jira URL (they are aliases)

#### Required Jira permissions

The Jira user must have **Browse users and groups**, **Administer Jira**, and **Browse projects**.&#x20;

#### Scopes for scoped API tokens (Read Only)

If you use **Create API token with scopes**, select **Jira** and add:

**Granular scopes (recommended):**

```
read:permission:jira
read:project:jira
read:project.property:jira
read:issue-type:jira
read:user:jira
read:application-role:jira
read:group:jira
read:avatar:jira
```

**Classic scopes (alternative):**

```
read:jira-work
read:jira-user
manage:jira-configuration
```

#### Scopes for scoped API tokens (Lifecycle) <a href="#h_01ha5ctj53h7v6sccbwdv7pvnq" id="h_01ha5ctj53h7v6sccbwdv7pvnq"></a>

```
read:user:jira
read:group:jira
read:avatar:jira
read:project:jira
read:project.property:jira
read:issue-type:jira
write:permission:jira
write:user.property:jira
write:group:jira
delete:group:jira
read:role:jira
delete:user.property:jira
```

### Configuring Atlassian Jira in your BalkanID tenant <a href="#h_01ha5ctj53h7v6sccbwdv7pvnq" id="h_01ha5ctj53h7v6sccbwdv7pvnq"></a>

1. Login to the BalkanID application and switch to the tenant you would like to add your integration to.
2. Head to *Integrations* > **Add Integration**, select **Atlassian Jira.**<br>

   <figure><img src="/files/hHrYFbUNmj5Lno3rsXcx" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/Q9TB6EqbVvIC4mKrWQ2E" alt=""><figcaption></figcaption></figure>
3. Set up the *Primary Application owner (mandatory)* and the *Description*, if any. Set up Secondary Application Owner(s), if any. <br>

   Select the Extraction Type. From here, you can configure your application using one of the following methods:

   1. **Direct integration** - Provide your Jira Personal Access Token and Jira Organization Site Name obtained above to set up a direct connection with BalkanID.
   2. **SCIM integration** - Provide SCIM server credentials to set up a SCIM connection with BalkanID.&#x20;
   3. **Manual file upload** - Upload Entity and Entity Relations through a .CSV file upload. Contact the team for assistance with this. &#x20;
   4. **Automated upload using API -** You can upload data using our [Bulk APIs](https://developer.balkan.id/) with the help of an API key which will be provided to you. Please refer to the [entity](https://developer.balkan.id/bulk-entities-upload-api-early-access-12828095e0) and [entity relation](https://developer.balkan.id/bulk-entity-relations-upload-api-early-access-12828102e0) upload docs for specific instructions on uploading your data through the API.&#x20;

      <figure><img src="/files/vjI4eLAqjUw3ucUwdcBj" alt="" width="563"><figcaption></figcaption></figure>

   **Note:** When setting up Jira Personal Access Token, format it as `me@example.com:my-api-token`, using the email associated with the token. In the **JIRA Site Name** field, enter the site name from Jira Admin Settings under Products.

<div align="center"><figure><img src="/files/FLL2fjssGZcFRREsOwYM" alt="" width="188"><figcaption></figcaption></figure></div>

4. Click on next to move onto *Optional Configuration.*
5. Fill **Optional configuration,** if required.  <br>

   <figure><img src="/files/EE54JzyGfYSxkGvhwBnW" alt=""><figcaption></figcaption></figure>
6. Once you filled in the information, click **Save**. Your integration is now configured and you will see the status of the integration displayed alongside other integrations on the *Integrations* page. When data is available, the integration Status will read **Connected** and the integration Message will read **Data available**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integration/atlassian-jira-application-integration-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
