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

# Set up a Slack Enterprise Grid connector

> C1 provides identity governance and just-in-time provisioning for Slack Enterprise Grid. Integrate your Slack Enterprise Grid instance with C1 to run user access reviews (UARs) and enable just-in-time access requests.

<Warning>
  **Yes, there are TWO kinds of Slack integration!** The instructions below integrate a Slack Enterprise Grid account with C1 so that you can review access data and grant user access to Slack. This integration supports GovSlack.

  (We also have an integration for [Slack Pro and Business+ accounts](/baton/slack).)

  If you want to install the C1 Slack app, so that you and your colleagues can request access and get notifications about new C1 tasks in your Slack workspace, go to the **Settings** page in C1 and click **Notifications**.
</Warning>

## Capabilities

| Resource         | Sync                                                          | Provision                                                     |
| :--------------- | :------------------------------------------------------------ | :------------------------------------------------------------ |
| Accounts         | <Icon icon="square-check" iconType="solid" color="#c937ae" /> | <Icon icon="square-check" iconType="solid" color="#c937ae" /> |
| Workspaces       | <Icon icon="square-check" iconType="solid" color="#c937ae" /> | <Icon icon="square-check" iconType="solid" color="#c937ae" /> |
| User groups      | <Icon icon="square-check" iconType="solid" color="#c937ae" /> | <Icon icon="square-check" iconType="solid" color="#c937ae" /> |
| IdP groups\*     | <Icon icon="square-check" iconType="solid" color="#c937ae" /> | <Icon icon="square-check" iconType="solid" color="#c937ae" /> |
| Workspace roles  | <Icon icon="square-check" iconType="solid" color="#c937ae" /> | <Icon icon="square-check" iconType="solid" color="#c937ae" /> |
| Enterprise roles | <Icon icon="square-check" iconType="solid" color="#c937ae" /> | <Icon icon="square-check" iconType="solid" color="#c937ae" /> |

The Slack Enterprise Grid connector supports [automatic account provisioning](/product/admin/account-provisioning).

\*The connector can sync and provision IdP groups only if SSO is configured for your Slack Enterprise Grid instance. IDP group provisioning is not supported for GovSlack instances.

### Connector actions

Connector actions are custom capabilities that extend C1 automations with app-specific operations. You can use connector actions in the [Perform connector action](/product/admin/automations-steps-reference#perform-connector-action) automation step.

| Action name   | Additional fields            | Description                                                                        |
| ------------- | ---------------------------- | ---------------------------------------------------------------------------------- |
| enable\_user  | `user_id` (string, required) | Activate a Slack Enterprise user account by setting active to true via SCIM API    |
| disable\_user | `user_id` (string, required) | Deactivate a Slack Enterprise user account by setting active to false via SCIM API |

## Gather Slack Enterprise Grid credentials

Configuring the connector requires you to pass in credentials generated in Slack Enterprise Grid. Gather these credentials before you move on.

<Warning>
  A user with the **Org owner** role in Slack Enterprise Grid must perform this task.
</Warning>

### Create a C1 app in Slack Enterprise Grid

<Steps>
  <Step>
    Make sure you are signed into your Slack Enterprise Grid account, then navigate to [api.slack.com/apps/](https://api.slack.com/apps/).
  </Step>

  <Step>
    Click **Create an App** and select the **From scratch** option.
  </Step>

  <Step>
    Give your new app a name, such as "C1 integration", and select a workspace you want to integrate with C1 (later we'll install the app org-wide).
  </Step>

  <Step>
    Click **Create App**.
  </Step>

  <Step>
    Your new app opens. From the menu on the left, select **Org Level App** and **Enable org-readiness**.
  </Step>

  <Step>
    Select **OAuth & Permissions** from the menu on the left.
  </Step>

  <Step>
    In the **Redirect URLs** section of the page, add `https://conductorone.com` as a new redirect URL.
  </Step>

  <Step>
    Scroll down to the **Scopes** section of the page. In the **Bot Token Scopes** area, add the following OAuth Scopes:

    * channels:join
    * channels:read
    * groups:read
    * team:read
    * usergroups:read
    * usergroups:write (include only if you want C1 to provision user group membership)
    * users.profile:read
    * users:read
    * users:read.email
  </Step>

  <Step>
    In the **User Token Scopes** area, add the following OAuth Scopes:

    * admin
    * admin.roles:read
    * admin.roles:write (include only if you want C1 to provision access)
    * admin.teams:read
    * admin.usergroups:read
    * admin.usergroups:write (include only if you want C1 to provision user group membership)
    * admin.users:read
    * admin.users:write (include only if you want C1 to provision access)
    * usergroups:write (include only if you want C1 to provision user group membership)
  </Step>
</Steps>

### Install the C1 app org-wide

You must now install the new app org-wide so that C1 can sync data from all of your organization's workspaces.

<Steps>
  <Step>
    While still on the **OAuth2 & Permissions** page, scroll up to **OAuth Tokens** section and click on **Install to Organization**.
  </Step>

  <Step>
    Carefully copy and save the token values.
  </Step>
</Steps>

### Add the C1 app to all workspaces

<Steps>
  <Step>
    in the **Integrations** section of the admin dashboard, click **Installed Apps**.
  </Step>

  <Step>
    Locate the app you created. Click the **...** icon and select **Add to more workspaces**.
  </Step>

  <Step>
    Check the box next to each workspaces you’d like to add the app to. To automatically add the app to new workspaces when they are created, check **Default for future workspaces**.
  </Step>

  <Step>
    Click **Next**.
  </Step>

  <Step>
    Check **I’m ready to add this app**.
  </Step>

  <Step>
    Click **Add App**.
  </Step>
</Steps>

**Done.** Next, move on to the connector configuration instructions.

## Configure the Slack Enterprise Grid connector

<Warning>
  To complete this task, you'll need:

  * The **Connector Administrator** or **Super Administrator** role in C1
  * Access to the set of Slack Enterprise Grid credentials generated by following the instructions above
</Warning>

<Tabs>
  <Tab title="Cloud-hosted">
    **Follow these instructions to use a built-in, no-code connector hosted by C1.**

    <Steps>
      <Step>
        In C1, navigate to **Integrations** > **Connectors** and click **Add connector**.
      </Step>

      <Step>
        Search for **Slack Enterprise Grid** and click **Add**.
      </Step>

      <Step>
        Choose how to set up the new Slack Enterprise Grid connector:

        * Add the connector to a currently unmanaged app (select from the list of apps that were discovered in your identity, SSO, or federation provider that aren't yet managed with C1)

        * Add the connector to a managed app (select from the list of existing managed apps)

        * Create a new managed app
      </Step>

      <Step>
        Set the owner for this connector. You can manage the connector yourself, or choose someone else from the list of C1 users. Setting multiple owners is allowed.

        If you choose someone else, C1 will notify the new connector owner by email that their help is needed to complete the setup process.
      </Step>

      <Step>
        Click **Next**.
      </Step>

      <Step>
        Find the **Settings** area of the page and click **Edit**.
      </Step>

      <Step>
        Paste the user token into the **User token** field.
      </Step>

      <Step>
        Paste the bot token into the **Bot token** field.
      </Step>

      <Step>
        If you're using a GovSlack instance, click the checkmark to **Enable GovSlack**.
      </Step>

      <Step>
        Click **Save**.
      </Step>

      <Step>
        The connector's label changes to **Syncing**, followed by **Connected**. You can view the logs to ensure that information is syncing.
      </Step>
    </Steps>

    **Done.** Your Slack Enterprise Grid connector is now pulling access data into C1.
  </Tab>

  <Tab title="Self-hosted">
    **Follow these instructions to use the Slack connector, hosted and run in your own environment.**

    When running in service mode on Kubernetes, a self-hosted connector maintains an ongoing connection with C1, automatically syncing and uploading data at regular intervals. This data is immediately available in the C1 UI for access reviews and access requests.

    ### Resources

    * [Official download center](https://dist.conductorone.com/ConductorOne/baton-slack-enterprise): For stable binaries (Windows/Linux/macOS) and container images.

    * [GitHub repository](https://github.com/conductorone/baton-slack-enterprise): Access the source code, report issues, or contribute to the project.

    ### Step 1: Set up a new Slack Enterprise Grid connector

    <Steps>
      <Step>
        In C1, navigate to **Integrations** > **Connectors** > **Add connector**.
      </Step>

      <Step>
        Search for **Baton** and click **Add**.
      </Step>

      <Step>
        Choose how to set up the new Slack Enterprise Grid connector:

        * Add the connector to a currently unmanaged app (select from the list of apps that were discovered in your identity, SSO, or federation provider that aren't yet managed with C1)

        * Add the connector to a managed app (select from the list of existing managed apps)

        * Create a new managed app
      </Step>

      <Step>
        Set the owner for this connector. You can manage the connector yourself, or choose someone else from the list of C1 users. Setting multiple owners is allowed.

        If you choose someone else, C1 will notify the new connector owner by email that their help is needed to complete the setup process.
      </Step>

      <Step>
        Click **Next**.
      </Step>

      <Step>
        In the **Settings** area of the page, click **Edit**.
      </Step>

      <Step>
        Click **Rotate** to generate a new Client ID and Secret.

        Carefully copy and save these credentials. We'll use them in Step 2.
      </Step>
    </Steps>

    ### Step 2: Create Kubernetes configuration files

    Create two Kubernetes manifest files for your Slack Enterprise Grid connector deployment:

    #### Secrets configuration

    ```yaml expandable theme={"theme":{"light":"css-variables","dark":"css-variables"}}
    # baton-slack-enterprise-secrets.yaml
    apiVersion: v1
    kind: Secret
    metadata:
      name: baton-slack-enterprise-secrets
    type: Opaque
    stringData:
      # C1 credentials
      BATON_CLIENT_ID: <C1 client ID>
      BATON_CLIENT_SECRET: <C1 client secret>

      # Slack Enterprise Grid credentials
      BATON_TOKEN: <Slack bot token>
      BATON_ENTERPRISE_TOKEN: <Slack OAuth user token>

      # Optional: include if you want C1 to provision access using this connector
      BATON_PROVISIONING: true

      # Optional: include if you're using a GovSlack instance
      BATON_GOV_ENV: true

      # Optional: include if you've configured SSO for Slack Enterprise Grid and want to manage IdP groups using C1
      BATON_SSO_ENABLED: true
    ```

    See the connector's README or run `--help` to see all available configuration flags and environment variables.

    #### Deployment configuration

    ```yaml expandable theme={"theme":{"light":"css-variables","dark":"css-variables"}}
    # baton-slack-enterprise.yaml
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: baton-slack-enterprise
      labels:
        app: baton-slack-enterprise
    spec:
      selector:
        matchLabels:
          app: baton-slack-enterprise
      template:
        metadata:
          labels:
            app: baton-slack-enterprise
            baton: true
            baton-app: slack-enterprise
        spec:
          containers:
            - name: baton-slack-enterprise
              image: ghcr.io/conductorone/baton-slack-enterprise:latest
              imagePullPolicy: IfNotPresent
            env:
            - name: BATON_HOST_ID
              value: baton-slack-enterprise
              envFrom:
                - secretRef:
                    name: baton-slack-enterprise-secrets
    ```

    ### Step 3: Deploy the connector

    <Steps>
      <Step>
        Create a namespace in which to run C1 connectors (if desired), then apply the secret config and deployment config files.
      </Step>

      <Step>
        Check that the connector data uploaded correctly. In C1, click **Apps**. On the **Managed apps** tab, locate and click the name of the application you added the Slack Enterprise Grid connector to. Slack Enterprise Grid data should be found on the **Entitlements** and **Accounts** tabs.
      </Step>
    </Steps>

    **Done.** Your Slack Enterprise Grid connector is now pulling access data into C1.
  </Tab>
</Tabs>
