From 72337544d8063dffaf1a81c8210835df12c85821 Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Wed, 24 Apr 2024 22:23:12 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20use=20team=20id=20for=20user=20f?= =?UTF-8?q?etching=20(#3839)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- providers/slack/resources/users.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/providers/slack/resources/users.go b/providers/slack/resources/users.go index 58d65cfd8f..76b7f954ac 100644 --- a/providers/slack/resources/users.go +++ b/providers/slack/resources/users.go @@ -28,8 +28,14 @@ func (s *mqlSlackUsers) list() ([]interface{}, error) { ctx := context.Background() + // get team id + teamInfo, err := client.GetTeamInfo() + if err != nil { + return nil, err + } + // requires users:read scope - users, err := client.GetUsersContext(ctx, slack.GetUsersOptionLimit(999)) + users, err := client.GetUsersContext(ctx, slack.GetUsersOptionTeamID(teamInfo.ID), slack.GetUsersOptionLimit(999)) if err != nil { return nil, err }