> 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/update-users-enterprise.md).

# Update Users (Enterprise)

Sends the same list of SCIM patch operations to every selected user with a `PATCH` request to the Slack SCIM `Users` endpoint. Use it to change fields such as display name, title, emails, phone numbers or the `active` flag. 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 Slack SCIM token with the scope `scim:write`, on a Slack Enterprise plan. Enter it in **Slack SCIM API Token**. 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       | `api.slack.com`           | The Slack SCIM API domain.                                                                                                                                                                                                                                                                                                            |
| Slack SCIM API Token     | Text | Yes      | None                      | Slack token with scope `scim:write`. Not masked after saving.                                                                                                                                                                                                                                                                         |
| Update Attributes (JSON) | Text | Yes      | None (initial value `{}`) | A JSON list of operations. Each item has `op` (`add`, `replace` or `remove`), `path` (a SCIM path such as `displayName`, `title`, `emails`, `phoneNumbers`, `name.givenName`, `active`) and `value` (omit for `remove`). The field's help text in the form lists many more examples, including the enterprise and profile extensions. |

### How it works

* At run time the text must be valid JSON and a list, otherwise the job fails with `Update Attributes must be valid JSON (list of operations).` or `Update Attributes must be a list of SCIM operations.`
* Wraps the list in a SCIM `PatchOp` message and sends one `PATCH https://<domain>/scim/v2/Users/<Slack ID>` request per user. 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 non-success response (`Slack SCIM update user <ID> failed with status <code>: <response text>`). Users handled before the error are already updated.
* Passes the same assets it received to the next node.

### Example

```json
[
  {"op": "replace", "path": "title", "value": "Security Analyst"},
  {"op": "replace", "path": "timezone", "value": "Europe/Istanbul"}
]
```

Put this in **Update Attributes (JSON)**, with **Slack Domain** `api.slack.com` and **Slack SCIM API Token** `YOUR_SLACK_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/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>Create Users (Enterprise)</strong></td><td>Create Slack users through SCIM.</td><td><a href="broken://pages/381cab6e7197dc4e319e33c19c222d80b04dd694">Broken link</a></td></tr><tr><td><strong>Suspend Users (Enterprise)</strong></td><td>Suspend users through SCIM.</td><td><a href="broken://pages/2464ca02fddf29e6c8982917196656b16a5c4568">Broken link</a></td></tr></tbody></table>

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