Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/
MongoCLI
/ / /

mongocli iam users describe

Return the details for the specified MongoDB user.

You can specify either the unique 24-digit ID that identifies the MongoDB user or the username for the MongoDB user.

User accounts and API keys with any role can run this command.

Command Syntax
mongocli iam users describe [options]
Name
Type
Required
Description

-h, --help

false

help for describe

--id

string

false

Unique 24-digit identifier of the user.

-o, --output

string

false

Output format. Valid values are json, json-path, go-template, or go-template-file. To see the full output, use the -o json option.

--username

string

false

Name that identifies the user. You must specify a valid email address.

Name
Type
Required
Description

-P, --profile

string

false

Name of the profile to use from your configuration file. To learn about profiles for MongoCLI, see https://dochub.mongodb.org/core/atlas-cli-configuration-file.

If the command succeeds, the CLI returns output similar to the following sample. Values in brackets represent your values.

ID FIRST NAME LAST NAME USERNAME EMAIL
<ID> <FirstName> <LastName> <Username> <EmailAddress>
# Return the JSON-formatted details for the MongoDB user with the ID 5dd56c847a3e5a1f363d424d:
mongocli users describe --id 5dd56c847a3e5a1f363d424d --output json
# Return the JSON-formatted details for the MongoDB user with the username myUser:
mongocli users describe --username myUser --output json

Back

delete

On this page