# Slack

### Overview

Use the Veza Slack integration to discover Slack users and groups. This guide explains how to prepare a Slack App for Veza and integrate it via Veza's **Configuration** page.

See [notes and supported entities](#notes-and-supported-entities) for further details.

### Setting Up Slack

Before connecting to Veza, generate a token to authorize Slack requests:

1. Go to your Slack instance and log in. Head to the Apps page, typically at `https://api.slack.com/apps`.
2. Choose **Create an App**.
3. Select **From Scratch** when setting up the Slack app.
4. Name the app and choose the workspace for Veza to discover.
5. In the **Oauth & Permissions** section, add these **User Token Scopes**:
   * `team:read`
   * `usergroups:read`
   * `users.profile:read`
   * `users:read`
   * `users:read.email`
6. Note down the **OAuth Tokens for Your Workspace**, usually starting with `xoxp-`.

For comprehensive steps, see Slack's [Create an App](https://api.slack.com/start/quickstart) guide.

### Integrating Slack with Veza

To fetch data from Slack via Veza:

1. Log into your Veza instance.
2. In the left menu, click **Configuration** and then **Integrations**.
3. Choose **Add Integration**.
4. In the **New Integration** window, select **Slack** from the **Integration Type** menu.
5. Provide the required details and click **Save**.

| Field              | Description                                                                |
| ------------------ | -------------------------------------------------------------------------- |
| Slack Token        | The `xoxp-` prefixed token that Veza uses for API operations.              |
| Skip deleted users | Boolean. If set to true, Veza will ignore deleted users during extraction. |

### Notes and Supported Entities

Veza creates both an ID and name for users and groups.

#### Slack User

A Slack User is an account in a Slack workspace. Users can be regular members, guests, or even bots.

| Property              | Description                              |
| --------------------- | ---------------------------------------- |
| `app_id`              | App ID for service account users         |
| `bot_id`              | Bot ID for service account users         |
| `email`               | User email address                       |
| `has_2fa`             | Indicates 2-factor authentication status |
| `is_active`           | Account active status                    |
| `is_admin`            | Admin status indicator                   |
| `is_app_user`         | Shows if the user is an app user         |
| `is_invited_user`     | Guest user status                        |
| `is_owner`            | Owner status                             |
| `is_primary_owner`    | Primary owner status                     |
| `is_restricted`       | Restricted user status                   |
| `is_ultra_restricted` | Ultra-restricted access status           |
| `real_name`           | User's full name                         |

#### Slack Group

Slack Groups, or User Groups, are for communicating with specific team subsets without individual mentions. Mentioning a User Group in a channel notifies all its members.

| Property      | Description                                                |
| ------------- | ---------------------------------------------------------- |
| `description` | Group description                                          |
| `is_external` | Indicates if the group is external to the native Slack app |
| `is_deleted`  | Deleted group status                                       |
| `created_by`  | ID of the group creator                                    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/integrations/slack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
