Make the MongoDB docs better! We value your opinion. Share your feedback for a chance to win $100.
MongoDB Branding Shape
Click here >
Docs Menu

Atlas CLI Authentication

To authenticate with Atlas using the Atlas CLI, run the following command:

atlas auth login [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas auth login.

For step-by-step instructions on logging in using the Atlas CLI, see Connect from the Atlas CLI.

To log out of your Atlas account using the Atlas CLI, run the following command:

atlas auth logout [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas auth logout.

To verify and display information about your authentication state using the Atlas CLI, run the following command:

atlas auth whoami [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas auth whoami.

Earn a Skill Badge

Master "Secure MongoDB Atlas: AuthN and AuthZ" for free!

Learn more