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 }