how to set Private Connection to MongoDB Atlas from Azure Synapse

Praveen Karape 0 Reputation points
2025-04-03T07:30:23.07+00:00

Dear Microsoft Community,

I hope this message finds you well.

As part of our business requirements, we are looking to establish a private and secure connection between our Azure Synapse workspace and our MongoDB Atlas database. I would appreciate your guidance on whether this is feasible and, if so, what the recommended approach would be.

Could you kindly share a step-by-step process to establish this connection? Additionally, it would be helpful to understand the network topology that is best suited for this integration, including any best practices or configurations that should be considered for optimal security and performance.

If there are any reference articles, documentation, or resources that can help us in achieving this, it would be greatly appreciated.

Thank you in advance for your support and assistance.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Smaran Thoomu 24,110 Reputation points Microsoft External Staff Moderator
    2025-04-03T09:49:48.2733333+00:00

    Hi @Praveen Karape

    Establishing a private and secure connection between Azure Synapse and MongoDB Atlas is feasible using Azure Private Link and MongoDB Atlas Private Endpoints. Below is the recommended approach:> Yes, it is possible to establish a private and secure connection between Azure Synapse and MongoDB Atlas using Azure Private Link and MongoDB Atlas Private Endpoints. This ensures that data remains within a secure network without exposure to the public internet.

    Step-by-Step Process to Set Up the Private Connection

    Step 1: Enable Private Endpoint in MongoDB Atlas

    1. Log in to MongoDB Atlas.
    2. Go to Network Access → Private Endpoint → Click Add Private Endpoint.
    3. Select Azure as the cloud provider and specify the Azure region where your Synapse workspace is deployed.
    4. Note the Private Endpoint Connection details, as you will use them in Azure.

    Step 2: Set Up Azure Private Link

    1. In the Azure Portal, go to Private Link Center → Private Endpoints.
    2. Click Create Private Endpoint and enter the following details:
      • Resource Type: Select MongoDB Atlas Private Endpoint.
      • Target Subnet: Choose a subnet within your Azure Virtual Network (VNet).
      • DNS Integration: Ensure that private DNS resolution is enabled for proper name resolution.
    3. Once created, approve the private endpoint in MongoDB Atlas.

    User's image

    Step 3: Configure Azure Synapse to Use the Private Endpoint

    1. In Azure Synapse, ensure the workspace has a Managed VNet (if applicable).
    2. In Synapse Firewall Rules, allow connections from the private endpoint’s VNet/Subnet.
    3. In Synapse Data Flow or Spark Pool, configure the MongoDB Connector URI using the private endpoint hostname.
    4. Test the connection using MongoDB Compass or Azure Synapse Notebooks.

    Network Topology & Best Practices

    • Use Private DNS Zones to ensure proper name resolution for the private connection.
    • Restrict Public Access to MongoDB Atlas once private connectivity is established.
    • Enable Network Security Groups (NSGs) to allow only required traffic between Azure Synapse and MongoDB Atlas.
    • Use Role-Based Access Control (RBAC) in Synapse and MongoDB Atlas to limit access.

    Further guidance please refer the below articles:

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.