> For the complete documentation index, see [llms.txt](https://docs.balkan.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integration/atlassian-application-integration-setup.md).

# Atlassian 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>

* ***Atlassian Service Account API Token***&#x20;
* ***Atlassian Organization ID***
* ***Atlassian Organization API Key***

### 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.&#x20;

#### Create API token

1. Go to [Atlassian Administration.](https://admin.atlassian.com/)
   1. If you are part of multiple organizations, select the desired organizations
   2. In the sidebar, expand **Directories** and select Service Accounts\
      ![](/files/hHHAR9T699HhnpfdShKs)
   3. Select the Service Account you want to use.
2. Choose **Create Credentials** > **API token**
3. Give the API token a name. Then, select the following scopes:
   1. The following **Fine-Grained** **Jira** scopes are required for least-privilege:<br>

      ```
      read:issue:jira  
      read:project:jira  
      read:jql:jira  
      read:comment:jira  
      read:attachment:jira
      read:user:jira  
      read:application-role:jira
      ```

      \
      Alternatively, these **Classic** scopes can also be used:<br>

      ```
      read:jira-user
      read:jira-work
      ```
   2. The following **Fine-Grained** **Confluence** scopes are required for least-privilege:<br>

      ```
      read:user:confluence
      read:group:confluence
      read:space:confluence
      read:content.permission:confluence  
      read:space.permission:confluence
      ```

      \
      Alternatively, these **Classic** scopes can also be used:<br>

      ```
      read:confluence-user
      read:confluence-groups
      read:confluence-space.summary
      read:permission:confluence
      ```
4. Copy the token and store it securely.

#### Required App (Jira/Confluence) permissions for Service Account

In order to use the above scopes, the service account must have **Jira Administrator** (site-level) and **Confluence Administrator** (site-level) on all the Jira and Confluence apps required to be discovered. <br>

This means it must be part of those apps with **App Admin** / **User Access Admin** permissions.&#x20;

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

#### Get your Organization Admin Token

1. Navigate to Atlassian Administration.

2. Expand Organization Settings in the sidebar, and click on API keys:\
   \
   ![](/files/orbuHdmruHxzQKVPFhru)

3. Click on **Create API key.**

4. Atlassian provides two types of API keys:

   * **Scoped API keys** – Grant access only to the organization APIs and permissions explicitly selected.
   * **Unscoped API keys** – Grant access to all organization APIs available to the organization administrator who created the key.

   You may create either type of key. If you choose to create a **scoped API key**, ensure that the following **Fine-Grained** scopes are selected:<br>

   ```
   read:orgs:admin
   read:directories:admin
   read:groups:admin
   read:accounts:admin
   read:workspaces:admin
   ```

   \
   In addition to the scopes listed above, the below **Fine-Grained** scopes must be enabled to ensure discovery of Atlassian [Credentials](/getting-started/entitlement-data-discovery/credentials-discovery/atlassian-credentials.md).<br>

   ```
   read:tokens:admin
   read:keys:admin
   read:service-accounts-tokens:admin
   ```

5. Copy and save the key to a secure location. Your organization ID is also available here.

#### Get your Organization  ID

Your Organization ID should have been displayed in the previous step while creating the Organization API key. If you did not note it down, you can retrieve it like so:

1. Navigate to [Atlassian Administration](https://admin.atlassian.com/).
2. If you belong to multiple organizations, select the desired organization.
3. Once the organization dashboard loads, check the browser address bar for the URL.
4. The Organization ID is the value that appears after `/o/` in the URL.

For Example,\
If your URL is `https://admin.atlassian.com/o/ORGANIZTION-ID/overview` the site name is `ORGANIZATION-ID` .

#### Config format

```
{
  "appConfig": {
    "token": "your-email@company.com:your_api_token",
    "orgId": "your-organization-id",
    "orgAdminToken": "your-Org-Admin-token"
  }
}
```

* **token**: `EMAIL:API_TOKEN` (email of the Jira user + colon + API token)
* **orgId**: Organization ID from your Atlassian Administration URL.
* **orgAdminToken:** Organization Admin token.

### Configuring Atlassian 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.**

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

<figure><img src="/files/3gSKKZCf84iCYn3eMJLs" alt=""><figcaption></figcaption></figure>

1. 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 Atlassian API Token, Organization ID  and Organization API Token obtained above to set up a direct connection with BalkanID.<br>

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

   **Note:** When setting up Atlassian API Token, format it as `serviceaccountid@example.com:my-api-token`, using the service account email associated with the token.&#x20;
2. Click on next to move onto *Optional Configuration.*
3. Fill **Optional configuration,** if required.  <br>

   <figure><img src="/files/EE54JzyGfYSxkGvhwBnW" alt=""><figcaption></figcaption></figure>
4. 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
