> 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/tenable/remove-group-from-user-on-tenable.md).

# Remove Group from User on Tenable

Removes each matched user asset from a Tenable user group. Assign Group to User on Tenable adds the users to the group instead.

### Before you begin

* An API key pair for Tenable Vulnerability Management: an **Access Key** and a **Secret Key**, generated in the Tenable console under Settings - My Account - API Keys. The default **Domain** is `https://cloud.tenable.com`.
* Connection defaults (Domain, Access Key, Secret Key, Timeout, Verify SSL) can be saved once under **Action Center** > **Settings**. See [Action Center Settings](broken://pages/742bb94503961e05b5eaa95572a142f73cd7ecb2).
* Asset type: user only.
* Required columns: `Email`, `Username`.
* Each user asset is matched to a Tenable user by the **Username Field** value, compared case-insensitively with the Tenable username, email and user name.
* The user that owns the API keys needs the Administrator role \[64] for user actions. Tenable answers 403 otherwise.

### Settings

The job node shows these fields.

| Setting             | Type           | Required | Default                     | Description                                                                                                             |
| ------------------- | -------------- | -------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| Domain              | URL            | No       | <https://cloud.tenable.com> | Base URL of Tenable. Example: `https://cloud.tenable.com`.                                                              |
| Access Key          | Sensitive text | Yes      | None                        | Generated in the Tenable console under Settings - My Account - API Keys. Masked after saving.                           |
| Secret Key          | Sensitive text | Yes      | None                        | The secret key of the same key pair. Masked after saving.                                                               |
| Timeout             | Number         | No       | 30                          | Request timeout in seconds.                                                                                             |
| Verify SSL          | Boolean        | No       | On                          | Verify the TLS certificate of the Tenable host.                                                                         |
| Retry on Rate Limit | Boolean        | No       | On                          | Retry a request once when Tenable answers 429, waiting for the `retry-after` header (at most 60 seconds).               |
| Maximum Assets      | Number         | No       | 500                         | Upper bound on how many assets a single run may act on. Extra assets are logged and skipped.                            |
| Username Field      | Choice         | No       | Email                       | Asset column matched against the Tenable username. Choices: `Email`, `Username`. Tenable usernames are email addresses. |
| User Group          | Text           | Yes      | None                        | Tenable user group name or id. Example: `Security Team`.                                                                |

### How it works

* Before any user is handled, the job finds the group by name (case-insensitive) or id. If the group does not exist, or its membership is fixed in Tenable, the job fails.
* The job reads the Tenable user list once and matches each user asset (cut to **Maximum Assets**) by the **Username Field**. Assets with no value or no Tenable match are skipped and logged at debug level; they are not counted as failures.
* For each matched user the job sends `DELETE /groups/<group uuid>/users/<user uuid>`. Users that are not members are skipped.
* A failure for one user is logged and the job continues. If every matched user fails, the job fails. If only some fail, the job succeeds and logs the counts. If no user matched, the job logs that it has nothing to act on.
* The job passes the matched assets it received on to the next node unchanged.

### Example

Remove offboarded users from a user group.

| Setting        | Value                       |
| -------------- | --------------------------- |
| Domain         | `https://cloud.tenable.com` |
| Access Key     | `YOUR_ACCESS_KEY`           |
| Secret Key     | `YOUR_SECRET_KEY`           |
| Username Field | `Email`                     |
| User Group     | `Security Team`             |

### 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/ed78ac5bacec4909acb71c776dd17d62cfa78748">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save connection defaults for Tenable jobs.</td><td><a href="broken://pages/742bb94503961e05b5eaa95572a142f73cd7ecb2">Broken link</a></td></tr><tr><td><strong>Assign Group to User on Tenable</strong></td><td>Add each matched user asset to a Tenable user group.</td><td><a href="broken://pages/6579fa95e32cbd3264153eadcf9d238bafaaaa18">Broken link</a></td></tr></tbody></table>

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