> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iru.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack

> Connect Slack to Iru Compliance with a bot token to collect workspace metadata, channel inventory, user and group membership, and Enterprise Grid audit logs.

### About Slack

The **Slack** connector reads workspace membership, channel configuration, and user groups. On **Enterprise Grid**, it also reads **audit log** events. It surfaces that information as artifacts in Iru Compliance. Iru authenticates with a **bot OAuth token** (`xoxb-`) obtained by installing a Slack app into your workspace. Access is **read-oriented** for compliance evidence; it does not send messages or change workspace settings through the scopes described here.

### How It Works

Slack APIs expect the bot token in the **Authorization** header:

```http theme={null}
Authorization: Bearer xoxb-XXXX-XXXX-XXXX
```

You create an app at **api.slack.com**, grant **Bot token scopes**, install the app to the workspace, then copy the **Bot User OAuth Token**. Expanding scopes requires **reinstalling** the app, which issues a **new** token. Update Iru whenever that happens.

| Detail             | Value                                                                                                                            |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| **Category**       | Communications                                                                                                                   |
| **Authentication** | Bearer token (bot OAuth token `xoxb-`)                                                                                           |
| **Audit logs**     | **`auditlogs:read`** is **Enterprise Grid only**. Without Grid, audit-log-style evidence is not available through this API path. |

References: [OAuth tokens](https://docs.slack.dev/authentication/tokens/), [Scopes](https://docs.slack.dev/scopes/), [Audit Logs API](https://docs.slack.dev/apis/audit-logs-api/).

### Prerequisites

* **Workspace Owner** or **Workspace Admin** rights so you can install apps.
* Ability to sign in to **[api.slack.com/apps](https://api.slack.com/apps)** for your workspace.
* Optional: Enterprise Grid if you need **`auditlogs:read`**.

**Typical bot scopes for directory and channel evidence**

| Scope              | Purpose                                          |
| ------------------ | ------------------------------------------------ |
| `users:read`       | Read member profiles                             |
| `users:read.email` | Read member email addresses                      |
| `channels:read`    | List and read public channels                    |
| `groups:read`      | List and read private channels (where permitted) |
| `usergroups:read`  | Read user group configuration                    |
| `auditlogs:read`   | Audit logs (**Enterprise Grid** only)            |

### Connect Slack to Iru

<Tabs>
  <Tab title="Slack">
    <Note>
      Complete this tab before you connect the source in Compliance.
    </Note>

    <Steps>
      <Step title="Open Slack API apps">
        In a browser, go to **[api.slack.com/apps](https://api.slack.com/apps)** and sign in with a Slack account that can **create apps** for the target **workspace** (often a workspace admin).
      </Step>

      <Step title="Create a new app">
        Select **Create New App**, then **From scratch** (unless your org standardizes on a manifest; this article assumes **From scratch**).
      </Step>

      <Step title="Name the app and pick the workspace">
        Enter an app name such as **Iru Compliance** and select the **Slack workspace** where Iru should install.
      </Step>

      <Step title="Open OAuth & Permissions">
        In the app’s left sidebar, open **OAuth & Permissions**.
      </Step>

      <Step title="Add Bot Token scopes">
        Under **Bot Token Scopes**, add each scope from **Prerequisites** that your controls require. Add **`auditlogs:read`** only if you are on **Enterprise Grid** and need audit evidence.
      </Step>

      <Step title="Install the app to your workspace">
        From **OAuth & Permissions**, select **Install to Workspace** (or **Reinstall** after scope changes). Review permissions and approve.
      </Step>

      <Step title="Copy the Bot User OAuth Token">
        Copy the **Bot User OAuth Token** (starts with **`xoxb-`**). If you change scopes later, reinstall to get a **new** token. Paste the current token into the Iru connector wizard when **Iru Compliance** prompts you.
      </Step>
    </Steps>

    <Note>
      Continue on the [**Iru Compliance**](#iru-compliance) tab.
    </Note>
  </Tab>

  <Tab title="Iru Compliance">
    <Note>
      Finish the [**Slack**](#slack) tab first.
    </Note>

    <Steps>
      <Step title="Open Sources">
        In Iru Compliance, on the left navigation bar, expand **Compliance** and select **Sources**.

        <Frame>
          <img src="https://mintcdn.com/iru/7HsGH7lnQ8GpVmI0/assets/media/images/iru-navigation-compliance-sources.png?fit=max&auto=format&n=7HsGH7lnQ8GpVmI0&q=85&s=595982441fd777b333b3ecfea24adc24" alt="Left navigation: Compliance expanded, Sources selected" width="424" height="1056" data-path="assets/media/images/iru-navigation-compliance-sources.png" />
        </Frame>
      </Step>

      <Step title="Turn on Slack">
        Find **Slack** (set **Category** to **Communications** or use **Search by name or description**). On that card, turn on the **toggle**. A browser tab or window may open for the connector wizard.
      </Step>

      <Step title="Paste the Bot token in the wizard">
        When the wizard asks for a bearer token, paste the **`xoxb-`** **Bot User OAuth Token** and submit.
      </Step>

      <Step title="Finish the connection">
        Click **Submit Bearer Token**. When the connection succeeds, the wizard shows **Connection Configured**.
      </Step>

      <Step title="Confirm the source is Active">
        Close the **Iru is requesting access to external services** browser tab, then return to **Compliance** → **Sources** and confirm the **Slack** card is **Active**.
      </Step>
    </Steps>
  </Tab>
</Tabs>

### Troubleshooting

<AccordionGroup>
  <Accordion title="Nothing opens when you turn the source on">
    Check **pop-up blocker** settings for the Iru site and try again.
  </Accordion>

  <Accordion title="not_authed / 401">
    Confirm the token is current, begins with **`xoxb-`**, and the app is still installed.
  </Accordion>

  <Accordion title="missing_scope">
    Add the scope under **OAuth & Permissions**, **reinstall** the app, copy the **new** token, and update Iru.
  </Accordion>

  <Accordion title="token_revoked">
    Reinstall the app or rotate credentials; update Iru with the new bot token.
  </Accordion>

  <Accordion title="No audit data">
    **`auditlogs:read`** requires **Enterprise Grid**. Without it, audit-log API evidence is unavailable.
  </Accordion>
</AccordionGroup>

### Considerations

<CardGroup cols={2}>
  <Card title="Bot tokens generally do not expire unless your…" icon="circle-info">
    Bot tokens generally **do not expire** unless your workspace enforces rotation. Follow Slack’s guidance if rotation is enabled.
  </Card>

  <Card title="Uninstalling the app revokes the token immediately." icon="shield">
    Uninstalling the app **revokes** the token immediately.
  </Card>

  <Card title="Scope increases always require reinstall and a new…" icon="server">
    Scope increases always require **reinstall** and a new token. Plan changes during a maintenance window.
  </Card>
</CardGroup>

### Related Articles

<CardGroup cols={2}>
  <Card title="Sources Management" icon="plug" href="/en/compliance/sources-management">
    Browse and manage every Compliance source.
  </Card>

  <Card title="Getting Started With Compliance" icon="rocket" href="/en/compliance/getting-started-with-compliance">
    Frameworks, actions, and **Artifacts**.
  </Card>

  <Card title="Iru Overview" icon="layer-group" href="/en/iru/platform-overview/iru-overview">
    How Endpoint, Compliance, and Identity fit together.
  </Card>

  <Card title="Artifacts Management" icon="folder-open" href="/en/compliance/artifacts-management">
    Upload, review, and organize evidence from sources and actions.
  </Card>
</CardGroup>
