# Distinguish Between Activated and Deactivated Users in \`mmctl user list\`

**URL:** <https://forum.mattermost.com/t/distinguish-between-activated-and-deactivated-users-in-mmctl-user-list/13672>\
**Category:** Troubleshooting\
**Created:** [July 12, 2022, 6:04am UTC](https://forum.mattermost.com/t/distinguish-between-activated-and-deactivated-users-in-mmctl-user-list/13672 "2022-07-12T06:04:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GOhrner](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/gohrner/32/5775_2.png) [@GOhrner](https://forum.mattermost.com/u/GOhrner)\
**Post date:** [July 12, 2022, 6:04am UTC](https://forum.mattermost.com/t/distinguish-between-activated-and-deactivated-users-in-mmctl-user-list/13672/1 "2022-07-12T06:04:27Z")

</div>

Currently, `mmctl user list` seems to output deactivated users as well as active users.

I also could not find a way to distinguis between deactivated users and active users in other `mmctl` commands - it’s not possible to `search` for them, and the information is not even contained in the user meta data returned by a search.

How can I use the CLI to only obtain a list of activated users, filtering out all deactivated ones?

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [July 14, 2022, 10:10am UTC](https://forum.mattermost.com/t/distinguish-between-activated-and-deactivated-users-in-mmctl-user-list/13672/2 "2022-07-14T10:10:24Z")

</div>

Hi,

I think you would have to use the API for that currently, since there’s no implementation in `mmctl` I’m aware of which does that.  
The API, however, supports that and has a flag “active” you can use to filter:

[https://api.mattermost.com/#operation/GetUsers](https://api.mattermost.com/#operation/GetUsers)

Best,  
Alex

---

<div class="post-metadata">

**Author:** ![GOhrner](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/gohrner/32/5775_2.png) [@GOhrner](https://forum.mattermost.com/u/GOhrner)\
**Post date:** [July 16, 2022, 4:02pm UTC](https://forum.mattermost.com/t/distinguish-between-activated-and-deactivated-users-in-mmctl-user-list/13672/3 "2022-07-16T16:02:04Z")

</div>

> **[\`mmctl user list\` Should Allow Filtering for Deactivated / Activated Users](https://mattermost.uservoice.com/forums/306457-general/suggestions/45434779--mmctl-user-list-should-allow-filtering-for-deact)**
>
> Currently, \`mmctl user list\` always shows all users, including deactivated (\`mmctl user deactivate xxxx\`) ones.
> 
> For most purposes I can think of, only the activated users would be relevant, but currently there does not even seem to be a way to...
