docs
docs copied to clipboard
Help Wanted: Explain how to determine a user ID
The user search command can use a user ID instead of a username. Describe how to determine a user ID.
See also #1501.
It looks like the only way to retrieve a user ID is through the API (or by querying the database). There does not seem to be a way to do this through the system console.
You can use the CLI. 'sudo ./platform user search
id: m1n7ef9t8tnctmmt8x8bbn4o6a username: peter_d nickname: position: ...
Hi @peterdamian, thanks for raising this.
I can confirm that it's now possible to obtain the user ID via the System Console in System Console > Users (screenshot attached). Would you say that's the best option for users (vs using the CLI)? If so, would you be open to submitting a PR for the CLI docs to reflect this?
Hi @justinegeffen , I would love to add this to docs. And, yeah this might be better way to get user ID (instead of using CLI) in general. Thanks, will update soon. :+1:
@avats-dev - Are you working on this issue?
Can i work on this?
@Sonichigo, thank you for your interest! I'd like to confirm with @avats-dev whether they're still working on this issue and then we can discuss further. :)
Sure sure!!
@Sonichigo - You're welcome to work on this issue! Would you like me to assign it to you?
I would love to work on this! Can you also provide a bit of context to be kept in mind while working on this, it would be great!!
@Sonichigo Thank you for taking this documentation task on!
There are multiple ways to retrieve a Mattermost User ID.
- from the CLI (only available for customers up to v5.39)
- from the mmctl (replaces the CLI in v6.0 and later)
- from the System Console (the most common ways for a Mattermost System Admin to perform this task)
I recommend reviewing the existing product documentation for each of these areas. Do we have steps documented for all 3 workflows above? If any are missing, identify an appropriate place to document these details, and the path the user would take through the docs to reach that information.
Please let me know if you have questions or concerns.
Thanks for assigning me the issue Carrie! Sure, I'll reach out to you if i have any concerns or questions.
Hey @cwarnermm , I have gone through the product documentation and found these docs. We can search for user and get there userID from running search option, still seeing for the system console option.
https://docs.mattermost.com/manage/command-line-tools.html#mattermost-user-search https://docs.mattermost.com/manage/mmctl-command-line-tool.html#mmctl-user-search
Hey @cwarnermm , found the additional system admin roles docs and think it would be better to add about system console method here do let me know whether it works or not!
@Sonichigo - The Additional System Admin roles page describes how to assign granular System Console access. On that page, there are a handful of cases where the applicable mmctl command uses userid. So this is certainly one place where this information could live.
I expect that there are numerous situations where a user may need to determine a user ID, and how they determine the ID will likely depend on what they're doing at the time this information is needed. With this in mind, I'm envisioning a new docs page that details all 3 ways of determining a user ID. We could then include links to this new page from other relevant topics. Thoughts?
That make sense! Depending what user is doing and how they are determining the UserID is situation dependent. Do let me know how I could help with these!!
@Sonichigo - The Additional System Admin roles page describes how to assign granular System Console access. On that page, there are a handful of cases where the applicable mmctl command uses
userid. So this is certainly one place where this information could live.I expect that there are numerous situations where a user may need to determine a user ID, and how they determine the ID will likely depend on what they're doing at the time this information is needed. With this in mind, I'm envisioning a new docs page that details all 3 ways of determining a user ID. We could then include links to this new page from other relevant topics. Thoughts?
@cwarnermm any updates on this ?
Happy New Year, @Sonichigo! Are you open to drafting a PR for a new docs page that details all 3 ways of determining a user ID. We could then include links to this new page from other relevant topics and I can help with that step.
Replaced by https://github.com/mattermost/docs/issues/6592