Docs Menu
Docs Home
/ /
MongoDB Command Line Interface
/ / / /

mongocli atlas security ldap get

On this page

  • Syntax
  • Options
  • Output
  • Example

The security ldap get command returns the current LDAP over TLS/SSL configuration details for an Atlas project. You can also retrieve the configuration details using the API.

mongocli atlas security ldap get
[ --output|-o <output-format> ]
[ --profile|-P <name-of-profile> ]
[ --projectId <id-of-project> ]

Note

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

Option
Type
Description
Required?
--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 Go template file

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

no
--profile, -P
string
Name of the profile to use for accessing the Atlas project. If omitted, uses the default profile.
no
--projectId
string

Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable.

yes

If the command succeeds, it returns the following output in the default format. If the command returns errors, see Troubleshooting for recommended solutions.

HOSTNAME PORT AUTHENTICATION AUTHORIZATION
<LDAP-server-hostname> <port-number> true|false true|false

The default output contains a subset of the fields returned by this command. For the complete list of JSON fields returned by the command, see the API reference.

The following example uses the mongocli atlas security ldap get command to get the current LDAP configuration details for the Atlas project specified using the default profile.

mongocli atlas security ldap get

The previous command prints the following to the terminal:

HOSTNAME PORT AUTHENTICATION AUTHORIZATION
atlas-ldaps-01.ldap.myteam.com 636 true true
mongocli atlas security ldap get

The previous command prints the following fields to the terminal:

{
"ldap": {
"authenticationEnabled": true,
"authorizationEnabled": true,
"hostname": "atlas-ldaps-01.ldap.myteam.com",
"port": 636,
"bindUsername": "CN=Administrator,CN=Users,DC=atlas-ldaps-01,DC=myteam,DC=com"
}
}

Back

Watch LDAP Configuration Request