> 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/slack/add-enterprise-user-to-workspace-enterprise.md).

# Add Enterprise User To Workspace (Enterprise)

Adds each selected user to one Slack workspace (team) by calling Slack's `admin.users.assign` API. You can add them as full members, guests or single-channel guests, and optionally place them in channels of that workspace. The users come from the assets the previous node collected.

{% hint style="info" %}
Slack only offers this API to workspaces on an Enterprise plan. The token help text in the job form says so.
{% endhint %}

### Before you begin

* A Slack API token: a user token (`xoxp-`) with the scope `admin.users:write`, on a Slack Enterprise plan. Enter it in **Slack API Token**.
* Asset type: **User** only (`allowed_asset_types` is `user`).
* Required column: `Specifics.slack.id`. Users whose Slack ID is empty are skipped without a message.
* Job defaults: Slack Domain, Slack API Token and the other fields can be saved as defaults for this job in [Action Center Settings](broken://pages/fa25776ab251a33bb2a7e69faf62f677f3b76280).

### Settings

| Setting             | Type     | Required | Default     | Description                                                                                                                                                                              |
| ------------------- | -------- | -------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Slack Domain        | Text     | No       | `slack.com` | The Slack domain the requests are sent to. Requests go to `https://<domain>/api/...`.                                                                                                    |
| Slack API Token     | Text     | Yes      | None        | User token (`xoxp-`) with scope `admin.users:write`. Not masked after saving.                                                                                                            |
| Team ID             | Text     | Yes      | None        | The ID of the workspace, for example `T1234`.                                                                                                                                            |
| Is restricted       | Checkbox | No       | Off         | Select to add the users as guests.                                                                                                                                                       |
| Is Ultra Restricted | Checkbox | No       | Off         | Select to add the users as single-channel guests.                                                                                                                                        |
| Channel IDs         | Text     | No       | None        | Channels of the new workspace to add the users to. Comma separated channel IDs, each starting with `C` and made of uppercase letters and numbers, for example `C0ACBBQ7PPE,C0ACQAQ7PAA`. |

### How it works

* Reads the Slack ID of every selected user and sends one `admin.users.assign` request per user with the Team ID and the guest options. Users that have no value in `Specifics.slack.id` are filtered out before the job runs.
* If no user has a Slack ID, the job fails with `No Slack user IDs found in the selected users.`
* Users are processed one after another and the job stops at the first error. Users handled before the error have already been added.
* If Slack answers with an error, the job fails with the message `<Slack API ...> error: <Slack error code>`, the run stops and the error appears under **Error Details** in **History**.
* Passes the same assets it received to the next node.

### Example

| Setting         | Value                  |
| --------------- | ---------------------- |
| Slack Domain    | `slack.com`            |
| Slack API Token | `YOUR_SLACK_API_TOKEN` |
| Team ID         | `T01234567`            |
| Is restricted   | Off                    |
| Channel IDs     | `C01234567,C07654321`  |

### 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/c53d026b9438b74e5c96c7a59bb6d75211026536">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/fa25776ab251a33bb2a7e69faf62f677f3b76280">Broken link</a></td></tr><tr><td><strong>Remove Enterprise User From Workspace (Enterprise)</strong></td><td>The opposite action.</td><td><a href="broken://pages/ee2b2b0ce3dcc1aee86a5435b7d15559adc6320d">Broken link</a></td></tr><tr><td><strong>Create Users (Enterprise)</strong></td><td>Create Slack users through SCIM.</td><td><a href="broken://pages/381cab6e7197dc4e319e33c19c222d80b04dd694">Broken link</a></td></tr></tbody></table>

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