Forum Discussion

morten-gn's avatar
morten-gn
New Member
19 hours ago

Secure connection to Azure DocumentDB (with MongoDB compatibility)

Has anyone succeeded with setting up a Managed Private Endpoint from Fabric to an Azure DocumentDB (with MongoDB compatibility).

We have other Azure services connecting to the database using private endpoints. 

Documentation mentions support for connections to Azure Cosmos DB for MongoDB using this Resource ID Format:

Azure Cosmos DB for MongoDB/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.DocumentDB/databaseAccounts/{account-name}

Our database has this resource ID format:
..../Microsoft.DocumentDB/mongoClusters/{account-name}

We can add the Managed Private Endpoint in Fabric and it will show provisioning for 2-3 minutes before failing without any error description. 

2 Replies

  • v-csrikanth's avatar
    v-csrikanth
    Icon for Community Support rankCommunity Support

    Hi morten-gn​ 

    Thanks for posting the resource ID that's actually the answer.

    Fabric's MPE supported-source table lists Azure Cosmos DB for MongoDB as Microsoft.DocumentDB/databaseAccounts. Yours is Microsoft.DocumentDB/mongoClusters, which is Azure DocumentDB / Cosmos DB for MongoDB vCore a separate Private Link resource (its subresource is MongoCluster, not MongoDB). mongoClusters isn't in Fabric's supported list today, so the documented format doesn't really apply to your cluster. That may well be why it sits in provisioning and then fails, though the docs don't spell that out.

    Two suggestions:

    Check which workload you actually need this for. MPE only covers Data Engineering items (notebooks, lakehouses, Spark job definitions) and Eventstream. If you're connecting from Dataflow Gen2, a pipeline, Copy job or Mirroring, look at a virtual network (VNet) data gateway instead that's the documented route for Azure sources sitting behind private endpoints. Watch DNS if you go that way: DocumentDB uses mongodb+srv with the private zone privatelink.mongocluster.cosmos.azure.com, so the gateway's VNet has to be able to resolve it.

    Log a support ticket for the failed endpoint. Since the MPE is landing in a Failed state with no error text, the documentation recommends raising a support request so the service team can look at the underlying provisioning error. You'd need to raise this from your tenant — we aren't able to open one on your behalf from the community forum. You can submit it here: https://support.fabric.microsoft.com/support/

    Thanks,
    C Srikanth
    Community Support Team

  • Thanks for the reply. My use cases requires MPE for Data Engineering. 

    I will look into using the data gateway as a workaround until MPE is supported.