> This page is for Data Protection.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eon.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eon.io/_mcp/server.

# MongoDB Atlas: Connect Source Organizations

This article explains how to connect a MongoDB Atlas organization to Eon as a source.
When you connect an organization, Eon automatically connects every project in the organization.
Use this method when you want to back up clusters across many Atlas projects without connecting each project individually.

## Connect a source organization

Start this procedure on the **Source Accounts > MongoDB Atlas projects** page in the Eon console.
Click **New Connection** and select **Connect organization**.
The **Connect source organization** wizard opens.

### Before you start

Before you connect a MongoDB Atlas organization, make sure:

* You can sign in to MongoDB Atlas as a user with permission to create organization-level API keys, plus database users and project-level resources across every project in the organization.

* You understand the permissions Eon installs in each project.
  See [MongoDB Atlas: Permissions Deployment Files].

[MongoDB Atlas: Permissions Deployment Files]: /data-protection/cloud-workloads/mongodb-atlas/permissions/mongodb-atlas-permissions-deployment-files

#### Run the setup

In the **Run the setup** section of the Eon wizard:

1. Choose **Terraform** or **Bash** with the deployment toggle.

2. If you chose **Bash**, enter your Atlas **Organization ID**.
   The Terraform path doesn't display this field — the Atlas Terraform provider reads the organization from its authentication credentials.

3. Run the generated code in your environment:

   #### Bash

   1. Copy the command shown in the **mongo-atlas-eon-setup.sh** code panel and run it in a terminal.
      The command downloads and runs the setup script, which provisions an Atlas database user (with the `readAnyDatabase` role) in each project, plus an organization-level Atlas API key (with the `ORG_READ_ONLY` role) and project-level access (with the `GROUP_READ_ONLY` role) for Eon.
      You can [review the script] before you run it.

   2. Follow the script's prompts to authorize the script with MongoDB Atlas.
      The script uses Atlas device-authorization OAuth: it displays a verification code and a URL, you open the URL in a browser, paste the code, and confirm.

   3. After the script finishes, copy the **Eon API Public Key** and **Eon API Private Key** values it prints.

   [review the script]: https\://eon-public-b2b628cc-1d96-4fda-8dae-c3b1ad3ea03b.s3.amazonaws.com/mongo-atlas-eon-setup.sh

   #### Terraform

   1. Copy the Terraform module shown in the **main.tf** code panel into your Terraform configuration.
      You can [review the module] before you apply it.
      The Terraform provider authenticates with the `MONGODB_ATLAS_PUBLIC_KEY` and `MONGODB_ATLAS_PRIVATE_KEY` environment variables (or other [Atlas Terraform provider authentication methods]).
      The provider credentials must have access to the organization you want to connect.

   2. Run `terraform apply`.

   3. After Terraform finishes, retrieve the Eon API key from the outputs:

      ```bash
      terraform output eon_public_key
      terraform output -raw eon_private_key
      ```

   [review the module]: https\://eon-public-b2b628cc-1d96-4fda-8dae-c3b1ad3ea03b.s3.amazonaws.com/mongo-atlas-eon-setup.zip[Atlas Terraform provider authentication methods]: https\://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/provider-configuration#authentication-methods

#### Complete configuration

In the **Complete configuration** section of the Eon wizard:

1. Paste the values from the previous step into the **Eon API Public Key** and **Eon API Private Key** fields.

2. Click **Connect**.

Eon validates the Atlas configuration and, on success, lists every project in the organization on the **MongoDB Atlas projects** page.

## See also

* [MongoDB Atlas: Connect Source Projects]
* [MongoDB Atlas: Permissions Deployment Files]
* [MongoDB Atlas: MongoDB Support]
* [About Source Accounts]

[MongoDB Atlas: Connect Source Projects]: /data-protection/cloud-workloads/mongodb-atlas/source-projects/mongodb-atlas-connect-source-projects

[MongoDB Atlas: MongoDB Support]: /data-protection/cloud-workloads/mongodb-atlas/resources/mongodb

[About Source Accounts]: /data-protection/backup-and-protection/backup-configuration/source-accounts/about-source-accounts