Christopher Ekfeldt
10/23/2025, 6:50 AMchannels:join - Join public channels in a workspace
• channels:read - View basic information about public channels in a workspace
• chat:write - Send messages as <app>
• files:write - Upload, edit, and delete files as <app>
• users:read - View people in a workspace
• users:read.email - View email addresses of people in a workspace
• groups:read - View basic information about private channels that your slack app has been added to
These permissions have been questioned by my Info-sec team regarding if these permissions all are necessary. Especially the users:read.email , we are a huge company, and this is very sensitive data. Why is that needed?kapa.ai
10/23/2025, 6:50 AMkapa.ai
10/23/2025, 6:51 AMChristopher Ekfeldt
10/23/2025, 6:52 AMkapa.ai
10/23/2025, 6:54 AMkapa.ai
10/23/2025, 6:55 AMChristopher Ekfeldt
10/24/2025, 1:11 PMpoetry run edr send-report --profiles-dir dbt/.dbt-profiles/ -t dev --env dev --days-back 1 --gcs-bucket-name <bucket_name> --slack-token <slack-token> --slack-channel-name <channel_name/channel_id>
locally i get:
INFO:elementary.monitor.data_monitoring.report.data_monitoring_report:Sent test results summary to Slack
Traceback (most recent call last):
File "/workspaces/dbt-analytics/.venv/bin/edr", line 8, in <module>
sys.exit(cli())
^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/click/core.py", line 1161, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/elementary/cli/cli.py", line 66, in invoke
return super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/click/core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/elementary/monitor/cli.py", line 750, in send_report
sent_report_successfully = data_monitoring.send_report(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/elementary/monitor/data_monitoring/report/data_monitoring_report.py", line 230, in send_report
self.send_report_attachment(local_html_path=local_html_path)
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/elementary/monitor/data_monitoring/report/data_monitoring_report.py", line 236, in send_report_attachment
send_succeeded = self.slack_client.send_report(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/ratelimit/decorators.py", line 113, in wrapper
return func(*args, **kargs)
^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/ratelimit/decorators.py", line 80, in wrapper
return func(*args, **kargs)
^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/elementary/clients/slack/client.py", line 142, in send_report
send_succeed = self.send_file(
^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/ratelimit/decorators.py", line 113, in wrapper
return func(*args, **kargs)
^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/ratelimit/decorators.py", line 80, in wrapper
return func(*args, **kargs)
^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/elementary/clients/slack/client.py", line 125, in send_file
channel_id = self._get_channel_id(channel_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/elementary/clients/slack/client.py", line 186, in _get_channel_id
channels, cursor = self._get_channels(cursor)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/ratelimit/decorators.py", line 113, in wrapper
return func(*args, **kargs)
^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/ratelimit/decorators.py", line 80, in wrapper
return func(*args, **kargs)
^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/elementary/clients/slack/client.py", line 168, in _get_channels
return self.list_conversations(cursor=cursor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/elementary/clients/slack/client.py", line 173, in list_conversations
response = self.client.conversations_list(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/slack_sdk/web/client.py", line 3327, in conversations_list
return self.api_call("conversations.list", http_verb="GET", params=kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/slack_sdk/web/base_client.py", line 169, in api_call
return self._sync_send(api_url=api_url, req_args=req_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/slack_sdk/web/base_client.py", line 200, in _sync_send
return self._urllib_api_call(
^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/slack_sdk/web/base_client.py", line 331, in _urllib_api_call
).validate()
^^^^^^^^^^
File "/workspaces/dbt-analytics/.venv/lib/python3.11/site-packages/slack_sdk/web/slack_response.py", line 197, in validate
raise e.SlackApiError(message=msg, response=self)
slack_sdk.errors.SlackApiError: The request to the Slack API failed. (url: <https://slack.com/api/conversations.list>)
The server responded with: {'ok': False, 'error': 'missing_scope', 'needed': 'channels:read,groups:read,mpim:read,im:read', 'provided': 'chat:write,files:write'}
@kapa.ai Can I do something to resolve this?
I want to run this through my Orchestration, but I think this error may break it from successfully finishing up the workflow.kapa.ai
10/24/2025, 1:12 PMkapa.ai
10/24/2025, 1:12 PMconversations.list API, which requires the channels:read and groups:read scopes (and sometimes mpim:read, im:read for other channel types). Without these, the app cannot look up the channel ID needed to upload the report file as an attachment. Even if you manually add the app to the channel, Elementary still needs channels:read (for public channels) and groups:read (for private channels) to resolve the channel name to a channel ID. This is confirmed in both the documentation and community discussions: - > "An app needs access to the channel info to post in it. This is why the command fails." [Slack scopes explanation](https://slack.com/archives/C02CTC89LAX/p1696335579019929) - > "If you omit channels:read or groups:read, the app will not be able to post in the respective channel types, and you may see errors about missing scopes if you try to do so." [Slack setup for Elementary CLI](https://docs.elementary-data.com/oss/deployment-and-configuration/slack) Resolution: You must add at least the following scopes to your Slack app for edr send-report to work: - chat:write - files:write - channels:read - groups:read If you are only posting to public channels, channels:read is required. For private channels, groups:read is also needed. The other scopes (users:read, users:read.email, channels:join) are optional unless you need user tagging or want the app to join channels automatically. Summary: Update your Slack app to include channels:read and groups:read in addition to chat:write and files:write. This will resolve the missing_scope error and allow Elementary to send reports to Slack as expected. If you need more details on why these scopes are required, see the linked explanations above.Christopher Ekfeldt
10/24/2025, 1:14 PMchannels:read could be enough to add then you mean to resolve the issue ? @kapa.aikapa.ai
10/24/2025, 1:14 PMkapa.ai
10/24/2025, 1:14 PMchannels:read scope should be sufficient for Elementary to resolve the channel and post the report or alert. The groups:read scope is only required for private channels. This is confirmed in the documentation and community discussions, which state that channels:read is needed to view and post to public channels, and groups:read is only necessary for private channels that the app has been added to [Slack setup for Elementary CLI](https://docs.elementary-data.com/oss/deployment-and-configuration/slack) [Slack scopes explanation](https://slack.com/archives/C02CTC89LAX/p1696335579019929). So, for your use case (public channel in a private workspace), you should add: - chat:write - files:write - channels:read This should resolve the missing_scope error you encountered. If you later need to post to private channels, you will need to add groups:read as well.