How to find All users in Mattermost & export it to some excel sheet report

Dear Team ,
We need to find all users names and need to check how many users are active / inactive this needs to be exported to an excel sheet / CSV via some mysql command .
I tried a lot using the solutions provided on community forum & I was able to get Inactive users list but unable to get All users list in proper format . Kindly help .
Regards ,
Rohan C

1 Like

Hello! Can I ask if the formatting of active/inactive users your referencing is the post I previously made on how to check for inactive users; Inactive users reporting?

I know that we can get this done, and I know we can surely export to, at minimum, a CSV file for use in whatever spreadsheet or manipulation method you’d like, I just wanted to check first though on what you referenced already.

1 Like

Here’s a simple query that should help you get all users in the correct format:
SELECT u.id, u.username, u.email, u.create_at, u.last_activity_at
FROM Users u;

I’ve been in a similar spot before with trying to get the full list of users in Mattermost. What worked for me was first running a simple MySQL query to grab all the user data from the database. You can use a query like SELECT * FROM Users; to get the full list. Once you have that, you can easily export it into a CSV. The formatting part can get a bit tricky, though. If you’re having trouble with that, there’s a free Excel template you can try, it really helped me get the data cleaned up quickly. Also, Microsoft Excel & Office Skills courses helped me get more comfortable with working through these tasks!

To get a complete list of users with their activity status in Mattermost, try using SELECT * FROM Users; in MySQL to pull all user data. Once you have this, exporting to CSV will be straightforward for organizing it in Excel.