Slack Integration

Version 1.34.0 (View all)
Managed integration release status GA
Subscription level
What's this?
Basic
Developed by
What's this?
Elastic
Ingestion method(s) API
Minimum Kibana version(s) 9.1.4
9.0.7
8.19.4
Important - Managed integrations on Elastic Cloud Hosted

You can use this integration as an Elastic Managed integration on Elastic Cloud Hosted deployments running this version or later.

Slack is used by numerous orgazations as their primary chat and collaboration tool.

The Slack integration uses Slack's API to retrieve audit events and a user inventory, and ingest them into Elasticsearch. This allows you to search, observe, and visualize the Slack log events through Elasticsearch.

The Elastic agent running this integration interacts with Slack's infrastructure using their APIs to retrieve audit logs, Enterprise Grid users, and user groups.

Please note these APIs are only available to Slack workspaces on an Enterprise Grid plan. These API methods will not work for workspaces on a Free, Standard, or Business+ plan.

Elastic Managed integrations are only supported on Elastic Cloud Serverless and Elastic Cloud Hosted deployments. An Elastic Managed integration lets you ingest data from a cloud source while avoiding the orchestration, management, and maintenance associated with standard ingest infrastructure. Elastic runs the collector for you, so you can focus on your data instead of the infrastructure that collects it.

For more information, refer to Elastic Managed integrations and the Elastic Managed integrations FAQ.

  1. In Kibana go to Management > Integrations
  2. In the "Search for integrations" search bar type Slack.
  3. Click on "Slack" integration from the search results.
  4. Click on Add Slack button to add Slack integration.

Enter values "OAuth API Token".

  1. OAuth API Token will be generated when a Slack App is created.

For the Slack integration to be able to successfully get logs the following "User Token Scopes" must be granted to the Slack App:

  • Audit logs: auditlogs:read
  • Users: admin.users:read
  • User groups: usergroups:read

The audit and users streams each have their own token. You can use one Slack app token that has all required scopes, or a separate token per stream. The users stream needs both admin.users:read and usergroups:read.

Audit logs summarize the history of changes made within the Slack Enterprise.

The users data stream collects a daily snapshot of Slack Enterprise Grid user accounts from admin.users.list. Each document is one user, for Elastic Security entity analytics.

It then collects user groups from usergroups.list for each workspace on those users, and attaches matching groups to slack.user.groups. The [Logs Slack] Users dashboard includes user and group panels.

The token must be an org-level user token (xoxp-) with the admin.users:read and usergroups:read scopes. The app must be installed on the Enterprise organization, not on a single workspace.

Each collection walks admin.users.list twice (is_active=true, then is_active=false) so a snapshot includes both active and deactivated accounts.

This integration includes one or more Kibana dashboards that visualizes the data collected by the integration. The screenshots below illustrate how the ingested data is displayed.