Docs Menu

Docs HomeMongoDB Command Line Interface

mongocli auth login

On this page

  • Syntax
  • Options
  • Inherited Options
  • Examples

Authenticate with MongoDB Atlas.

Command Syntax
mongocli auth login [options]
Name
Type
Required
Description
--cm
false
Log in to Cloud Manager.
--gov
false
Log in to Atlas for Government.
-h, --help
false
help for login
--noBrowser
false
Don't try to open a browser session.
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.
# To start the interactive login for your MongoDB Atlas or Cloud Manager account:
mongocli auth login
←  mongocli authmongocli auth logout →
Share Feedback