> 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/action-center/jira/delete-user-on-jira-self-hosted.md).

# Delete User on Jira Self Hosted

Deletes from Jira Self-Hosted every user that the workflow collected, using the username that the Jira Self-Hosted user adapter stored for each user.

### Before you begin

* A Jira Self-Hosted base URL and the username and password of an admin account.
* The `jira-self-hosted-user` adapter must be connected and discovered, because the job reads the username from it.
* Accepted asset type: `user`. Required column: `Specifics.jira-self-hosted-user.name`. Users without a value there are left out.
* Defaults you saved for this job in [Action Center Settings](broken://pages/c24f789e38de30d1826122b3a82f349153f232b9) pre-fill the node form. Options you leave out are filled from them when you save the node.

{% hint style="warning" %}
This job deletes real Jira accounts. Test the saved query on a notification job first.
{% endhint %}

### Settings

These are the fields of the job node form.

| Setting        | Type | Required | Default | Description                                                                                  |
| -------------- | ---- | -------- | ------- | -------------------------------------------------------------------------------------------- |
| Jira Base URL  | Text | Yes      | None    | Full Jira URL, for example `https://jira.company.com`.                                       |
| Admin Username | Text | Yes      | None    | Username of the admin performing the deletion.                                               |
| Admin Password | Text | Yes      | None    | Password of the admin performing the deletion. Secret, but shown as plain text (not masked). |

### How it works

* The job collects the Jira username of each matched user and sends one `DELETE` to `<Jira Base URL>/rest/api/2/user?username=<name>` per user, one after another, authenticated as the admin.
* If none of the matched users has a username, the job fails with `No Jira usernames found in the selected users.`
* The first rejected request stops the job with `Jira delete user failed with status: <code>`. Users deleted before that stay deleted, and the rest are not attempted.
* The assets pass on to the next node unchanged.

### Example

Delete the Jira accounts of users that a condition node matched.

| Setting        | Value                      |
| -------------- | -------------------------- |
| Jira Base URL  | `https://jira.example.com` |
| Admin Username | `admin`                    |
| Admin Password | `YOUR_API_TOKEN`           |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/08e1c051f3c3fc15c184408533696e2939698d56">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save default values for this job.</td><td><a href="broken://pages/c24f789e38de30d1826122b3a82f349153f232b9">Broken link</a></td></tr><tr><td><strong>Delete User on Jira Cloud</strong></td><td>The same job for Jira Cloud.</td><td><a href="broken://pages/6a9fb767d60d4d968f80f4e5d5a4bf2c38f24158">Broken link</a></td></tr><tr><td><strong>Create User on Jira Self-Hosted</strong></td><td>Create a user on Jira Self-Hosted.</td><td><a href="broken://pages/1b80576f2f4c02286840bf00e1531b7c84890127">Broken link</a></td></tr></tbody></table>

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