docs icon indicating copy to clipboard operation
docs copied to clipboard

Help Wanted: Explain how to determine a user ID

Open peterdamian opened this issue 8 years ago • 16 comments

The user search command can use a user ID instead of a username. Describe how to determine a user ID.

See also #1501.

peterdamian avatar Sep 17 '17 14:09 peterdamian

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.

peterdamian avatar Sep 24 '17 18:09 peterdamian

You can use the CLI. 'sudo ./platform user search ' returns :

id: m1n7ef9t8tnctmmt8x8bbn4o6a username: peter_d nickname: position: ...

peterdamian avatar Sep 24 '17 19:09 peterdamian

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?

justinegeffen avatar Mar 02 '20 17:03 justinegeffen

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 avatar Oct 02 '20 01:10 avats-dev

@avats-dev - Are you working on this issue?

cwarnermm avatar Jan 21 '22 14:01 cwarnermm

Can i work on this?

Sonichigo avatar Feb 27 '22 05:02 Sonichigo

@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. :)

justinegeffen avatar Feb 28 '22 13:02 justinegeffen

Sure sure!!

Sonichigo avatar Feb 28 '22 13:02 Sonichigo

@Sonichigo - You're welcome to work on this issue! Would you like me to assign it to you?

cwarnermm avatar Mar 10 '22 13:03 cwarnermm

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 avatar Mar 10 '22 13:03 Sonichigo

@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.

cwarnermm avatar Apr 04 '22 12:04 cwarnermm

Thanks for assigning me the issue Carrie! Sure, I'll reach out to you if i have any concerns or questions.

Sonichigo avatar Apr 04 '22 15:04 Sonichigo

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

Sonichigo avatar Apr 21 '22 02:04 Sonichigo

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 avatar May 01 '22 01:05 Sonichigo

@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 avatar May 02 '22 14:05 cwarnermm

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 avatar May 04 '22 03:05 Sonichigo

@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 ?

Sonichigo avatar Jan 12 '23 12:01 Sonichigo

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.

cwarnermm avatar Jan 12 '23 13:01 cwarnermm

Replaced by https://github.com/mattermost/docs/issues/6592

cwarnermm avatar Aug 17 '23 14:08 cwarnermm