> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/j/jira-cloud.md).

# Jira Cloud

Jira Cloud is Atlassian's hosted issue tracking product. OctoXLabs reads the Atlassian user accounts of your Jira Cloud site and adds them to the user inventory. App and customer accounts are not imported.

## Use cases

* **Find Jira users that have no directory account.** List Jira users that are not found in Active Directory. How accounts are matched depends on your user merge settings.

```
Adapters = jira-cloud-user AND NOT Adapters = active-directory
```

* **Review Jira users by email domain.** Find accounts that use an address outside your company domain.

```
Adapters = jira-cloud-user AND NOT Email ~ <your domain>
```

## Before you begin

### Network

| Source              | Destination    | Port | Protocol |
| ------------------- | -------------- | ---- | -------- |
| OctoXLabs connector | .atlassian.net | 443  | HTTPS    |

The connector builds the address as `https://<Domain>.atlassian.net`. If an HTTPS proxy is configured, requests go through it.

### Required permissions

| Scope or role                               | Permission | Needed for                   |
| ------------------------------------------- | ---------- | ---------------------------- |
| Browse Users and Groups (global permission) | Allow      | Listing users                |
| read:jira-user (scope)                      | Read       | Listing users                |
| read:email-address:jira (scope)             | Read       | Reading user email addresses |

The baseline names this permission and these scopes. The connector code does not check them.

## Create credentials in Jira

{% stepper %}
{% step %}

### Pick the account

Use an Atlassian account that has the **Browse Users and Groups** permission in Jira.
{% endstep %}

{% step %}

### Create an API token

Open <https://id.atlassian.com/manage-profile/security/api-tokens> and select **Create API token**. Give it a name and choose an expiration date between 1 and 365 days.
{% endstep %}

{% step %}

### Select scopes

Select the app and the scopes the token should access: `read:jira-user` and `read:email-address:jira`.
{% endstep %}

{% step %}

### Copy the token

Select **Create** and copy the token. You cannot read it again later.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter     | Required | Type    | Default | Description                                                                                             |
| ------------- | -------- | ------- | ------- | ------------------------------------------------------------------------------------------------------- |
| Domain        | Yes      | String  | None    | Part of your Jira URL before `.atlassian.net`. For <https://mycompany.atlassian.net> enter `mycompany`. |
| Email Address | Yes      | String  | None    | Email address of the Atlassian account.                                                                 |
| API Token     | Yes      | String  | None    | Atlassian API token of that account.                                                                    |
| HTTPS Proxy   | No       | String  | None    | Proxy address, used as the HTTPS proxy as entered.                                                      |
| Timeout       | No       | Integer | 30      | Seconds to wait for an API response.                                                                    |

## Troubleshooting

| Error message                                                     | Cause                                                                                   | Fix                                                                                            |
| ----------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| Invalid JSON response while fetching test users (status={status}) | The connection test got a response that is not JSON.                                    | Check the Domain value and that the site is reachable. A wrong domain can return an HTML page. |
| Invalid JSON response while fetching users (status={status})      | A page of users could not be read as JSON during discovery.                             | Run the connection test and check the credentials.                                             |
| Status Code: `, followed by URL, Method and the response body`    | The API answered with a status other than 200. This is the shared REST connector error. | Read the status code and body in the message, then check the credentials, permissions and URL. |

## Change history

{% hint style="info" %}
Available starting from version 6.4.0.
{% endhint %}
