Manage channels users CLI

Looking for commands to manage users in a private channel. I need to modify a channel member, making him a channel admin. Need to use CLI, as this is a private channel which I do not need to join (even as a system admin). Didn’t find any documentation that would be helpful. Is there such a command?

I’m on E10 license.

Hello, @phs

There is no CLI command that allow System Administrators to manually add users in a private channel, especially if the account is not a participant in the channel.

May I know if you are able to ask the channel admin to add the channel member instead and make the changes accordingly?

If not, is there any specific reason as to why it has to be done through your account?

There is no CLI command that allow System Administrators to manually add users in a private channel, especially if the account is not a participant in the channel.

However I just did this using ./mattermost channel add team:private-channel username, and it worked. Reference: Redirect. What I need is now to make this username a Channel Admin.

May I know if you are able to ask the channel admin to add the channel member instead and make the changes accordingly?

If I could ask the current Channel Admin I wouldn’t be looking for a CLI command. I had the impression a System Admin could override anyone and anything in Mattermost.

Hello - we have this problem as well - lots of private channels were no one knows (or can figure out) who the admin is. As the system administrator, the only thing I can think of is to add myself to the channel, as per @phs, set the channel owner in the GUI, and then leave the channel.

Any other thoughts on how to do this? Even if I could use a CLI command to simply list the channel admin that would be helpful. Thanks!

1 Like