Docs Home → MongoDB Command Line Interface
mongocli atlas dbusers describe
mongocli atlas
commands are now deprecated because there's a new, dedicated CLI available for Atlas users. Migrate to the Atlas CLI to enjoy the same capabilities and the latest features. You can use mongocli atlas
commands until April 30, 2023.Return the details for the specified database user for your project.
To use this command, you must authenticate with a user account or an API key that has the Project Read Only role.
Syntax
Command Syntax
mongocli atlas dbusers describe <username> [options]
Arguments
Name | Type | Required | Description |
---|---|---|---|
username | string | true | Username to retrieve from the MongoDB database. The format of the username depends on the user's method of authentication. |
Options
Name | Type | Required | Description |
---|---|---|---|
--authDB | string | false | Authentication database name. If the user authenticates with AWS IAM, x.509, or LDAP, this value should be $external. If the user authenticates with SCRAM-SHA, this value should be admin. This value defaults to "admin". |
-h, --help | false | help for describe | |
-o, --output | string | false | Output format. Valid values are json, json-path, go-template, or go-template-file. To see full output, use the -o json option. |
--projectId | string | false | Hexadecimal string that identifies the project to use. This option overrides the settings in the configuration file or environment variable. |
Inherited Options
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. |
Output
If the command succeeds, the CLI returns output similar to the following sample. Values in brackets represent your values.
USERNAME DATABASE <Username> <DatabaseName>
Examples
# Return the details for the SCRAM SHA-authenticating database user named myDbUser: mongocli atlas dbuser describe myDbUser --authDB admin --output json
# Return the details for the AWS IAM-authenticating database user with the ARN arn:aws:iam::772401394250:user/my-test-user. Prepend $external with \ to escape the special-use character: mongocli atlas dbuser describe arn:aws:iam::772401394250:user/my-test-user --authDB \$external --output json
# Return the details for the X.509-authenticating database user with the RFC 2253 Distinguished Name CN=ellen@example.com,OU=users,DC=example,DC=com. Prepend $external with \ to escape the special-use character: mongocli atlas dbuser describe CN=ellen@example.com,OU=users,DC=example,DC=com --authDB \$external --output json