> 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/a/atlassian-guard.md).

# Atlassian Guard

Atlassian Guard secures the users and apps of an Atlassian organization. OctoXLabs reads the user accounts of a SCIM directory.

## Use cases

* Find Atlassian Guard accounts that have no match in your directory.

```
Adapters = atlassian-guard AND NOT Adapters = active-directory
```

* Check what one Atlassian Guard connection collected.

```
Connections = YOUR_CONNECTION_NAME
```

## Before you begin

### Network

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

### Required permissions

| Scope or role                                                   | Permission | Needed for                               |
| --------------------------------------------------------------- | ---------- | ---------------------------------------- |
| SCIM API key generated by an Atlassian Guard organization admin | Read-only  | All user accounts of that SCIM directory |

The key is scoped to the SCIM directory it was created for.

## Create credentials in Atlassian Guard

{% stepper %}
{% step %}

### Open the organization

Go to admin.atlassian.com and select your organization.
{% endstep %}

{% step %}

### Open identity providers

From the top menu choose **Security**, then **Identity providers** in the left panel.
{% endstep %}

{% step %}

### Choose the directory

Choose the relevant Directory.
{% endstep %}

{% step %}

### Regenerate the key

Click the three dots menu under User Provisioning (bottom right). Select **Regenerate API key**, then **Regenerate key**.
{% endstep %}

{% step %}

### Copy the values

Copy the **Directory base URL** and the **API key**. They are not shown again. Click **Done**. The Directory ID is the last part of the base URL, for example `abcdeg1234` in `https://api.atlassian.com/scim/directory/abcdeg1234`.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter    | Required | Type    | Default | Description                                          |
| ------------ | -------- | ------- | ------- | ---------------------------------------------------- |
| Directory ID | Yes      | String  | None    | SCIM directory ID from the Directory base URL.       |
| API Token    | Yes      | String  | None    | SCIM API key used for Bearer authentication.         |
| HTTPS Proxy  | No       | String  | None    | Proxy URL, used as the HTTPS proxy value as entered. |
| Timeout      | No       | Integer | 30      | Time in seconds to wait for API responses.           |

## Troubleshooting

| Error message                                                          | Cause                                                                  | Fix                                                                                                                                           |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Invalid JSON response while fetching users (status=`)`                 | The API did not return JSON.                                           | Check the Directory ID and the API key.                                                                                                       |
| Status Code: `, followed by the URL, the method and the response body` | The API answered with a status other than the one the adapter expects. | Read the code and body. 401 or 403 usually points to wrong credentials or missing permissions. Check the address, port and Is Secure setting. |

## Change history

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