Navigation

mongocli iam user describe

The mongocli iam user describe command retrieves information about a user specified by username or ID. You can also retrieve details about a user using the API for your MongoDB service:

mongocli iam user describe
--id <user-id>
[ --output|-o <output-format> ]
[ --profile|-P <profile-name> ]
--username <username-of-user>
Note

Use -h or --help to view the command-line help for this command.

Option
Type
Description
Required?
--id
string
Unique identifier of the user. Either id or username is required.
conditional
--output, -o
string

Command output format. Valid values are:

  • json for output in JSON format
  • go-template for custom output using the Go template
  • go-template-file for custom output specified using the Go template file

If omitted, the command returns output in the default format.

no
--profile, -P
string
Name of the profile that contains the access information. If omitted, uses the default profile.
no
--username
string
Username of the user. Either username or id is required.
conditional

The command prints the following output to the terminal if the command succeeds. If the command returns errors, see Troubleshooting for recommended solutions.

ID FIRST NAME LAST NAME USERNAME EMAIL
<user-email> <first-name> <last-name> <username> <email-address>

The above default output is a subset of the fields returned by this command. For the complete list of JSON fields returned by the command, see the API reference for your MongoDB service:

The following command returns information in the default format about a user whose ID is 5dd56c847a3e5a1f363d424d in a Cloud Manager organization. It uses the default profile for accessing Cloud Manager.

mongocli iam user describe --id 5dd56c847a3e5a1f363d424d

The previous command prints the following to the terminal:

ID FIRST NAME LAST NAME USERNAME EMAIL
5dd56c847a3e5a1f363d424d John Doe john.doe@example.com john.doe@example.com
Give Feedback