mongocli atlas security ldap get
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.
Syntax
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.
Options
Option | Type | Description | Required? |
---|---|---|---|
--output , -o | string | Command output format. Valid values are:
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 |
Output
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.
Example
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" } }