mmctl
mmctl copied to clipboard
[feature request] get users from server
this issue is more of a feature request/discussion one than an actual issue
in the current mattermost cli there are some commands to show users but it would be really great if mmctl could support a more generic approach that allows for more filtering. like getting all inactive users, or just getting a list of ALL users on the server that in turn could be piped into other tools or mmctl again to allow for more versatile commands.
I'm thinking something along the line of mmctl user list > users.txt
and then running that in a loop and (for example) getting user info for each user and doing something with that info (like deactivating).
It's a use case I've seen for a lot of customers and not all of them want to run SQL queries against their database, so having this in mmctl would probably help them out a lot.
why do you want to use a loop instead of bulk selection?
We use LDAP as auth_service. If we delete a user in ldap the Account became inactive in Mattermost. I want to delete inactive users on regular basis.
It would be nice to search inactive users only or get the inactive state with mmctl user search, to loop over them and delete the accounts.
Created the ticket: https://mattermost.atlassian.net/browse/MM-43074
Tracked via https://github.com/mattermost/mattermost/issues/19916. Closing.