Mmctl channel user list doesn't exist?

Hi guys,

Please tell me if i’m in the wrong place.

Well, i’d like to use mmctl to know all the users in a specific team:channel.
Is it possible with mmctl ? i’d prefer not to use sql to achieve this task.

I’ve read mmctl command line tool — Mattermost documentation with no success.

thank you and regards,

f.

1 Like

Hi @fab2 and welcome to the Mattermost forums!

Sorry for the late reply, I just stumbled upon your older post. Unfortunately it is not possible to list users per channel currently with mmctl, this would need to be a database query or an API call.

Database query:

select concat(c.name, ' (', c.displayname, ')') AS channel, u.username AS user FROM channels AS c,users AS u, channelmembers AS cm where cm.userid = u.id AND cm.channelid = c.id AND cm.channelid='<your-channel-id>';

API Call:
https://api.mattermost.com/#operation/GetChannelMembers

thank you @agriesser :wink:
f.