Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
vivien57
Super User
Super User

Error - Using the MongoDB Om-Premise Connector

Hello everyone,

I'm trying to establish a connection between Fabric and an on-premises MongoDB server.

https://learn.microsoft.com/en-us/fabric/data-factory/connector-mongodb-overview

In fact, the scenario involves writing data from Fabric to an on-premises MongoDB NoSQL database.

vivien57_0-1778253208221.png


The connection has been successfully established on the gateway side (with all necessary firewall rules configured).

Then I see the connection in the “Copy Data” section of the “Data Pipeline.” So that means the mapping is working properly.

However, the connection test isn't working...

vivien57_1-1778253402807.png


Of course, the error message doesn't help at all.

For your information, here is the server pattern specified in the gateway connection

mongodb01.example.com:27017,mongodb22.example.com:27017,mongodb03.example.com:27017/?authMechanism=DEFAULT&authSource=xxxxxxxxx


Thank in advance for your help

Have a nice day,

Vivien

9 REPLIES 9
v-karpurapud
Community Support
Community Support

Hi @vivien57 

Just checking in as we haven't received a response to our previous message. Were you able to review the information above? Let us know if you have any additional questions.

Thank You.

v-karpurapud
Community Support
Community Support

Hi @vivien57 

Thank you for submitting your question to the Microsoft Fabric Community Forum, and thanks to  @Thomaslleblanc  and @ABD128   for sharing helpful suggestions.

Could you let us know if the suggested solution resolved your issue? If not, please share any additional details so we can assist further.

Best regards,
Community Support Team.

Thomaslleblanc
Super User
Super User

Before retrying:

  • Database name has no dots
  • Database name has no spaces
  • Database name is not empty
  • Database name is not the server name
  • If parameterized, parameter resolves to a clean string

Hello @Thomaslleblanc ,

Thank you for your feedback.

When you set up the connection at the gateway, you enter:

Option 1 :

mongodb01.example.com:27017,mongodb22.example.com:27017,mongodb03.example.com:27017/?authMechanism=DEFAULT&authSource=xxxxxxxxx


or

Option 2:

mongodb01.example.com:27017,mongodb22.example.com:27017,mongodb03.example.com:27017

 
By "Database name", do you mean what is specified as "AuthSource" ?

If so, in my case there’s just a “-”; the pattern is “xxxx-yyyy”

Thank in advance,

Have a nice day,

Vivien

Hi @vivien57 

 

The issue is likely not related to the authSource value or the hyphen in the database name. In Fabric, the Database field in the Copy activity is separate from authSource and must explicitly reference a valid MongoDB database (not blank or unresolved). The more likely issue is the connection string format and how the connector parses it during validation. I would recommend using a standard MongoDB URI format such as: mongodb://mongodb01.example.com:27017,mongodb22.example.com:27017,mongodb03.example.com:27017/?authSource=xxxx-yyyy&authMechanism=DEFAULT

 

Also verify that the Database field in the Copy activity is explicitly populated, URI parameters are passed using standard & separators, and, if connecting to a replica set, the replicaSet parameter may also be required depending on the MongoDB configuration.

 

For isolation, it may also help to test temporarily with a simplified single-node connection string.

 

Regards,

ABD

Hello @ABD128 ,

Thank for your help.

With the suggested connection string, I get this error (which already seems clearer and more specific).

vivien57_0-1778827152801.png

I tried using a single-node setup, but it doesn’t work.

I’d say we’ve made some progress with the new errors, but for the moment I can’t find.

Thank in advance,

Have a nice day,

Vivien

 




Hi @vivien57 

 

That’s useful feedback, because it confirms the issue is not related to the replica set syntax or multi-node configuration. The newer error also makes it clearer that Fabric is rejecting URI-style options in the Server field itself, so the connector is at least validating the input more specifically now.

 

At this stage, the key points to verify are:

Use only the host:port value in the Server field (no mongodb://, no authSource, no query parameters)

Configure authentication separately in the connection settings/gateway

Explicitly populate the Database field in the Copy activity with a valid MongoDB database name Validate that the MongoDB user has permissions on both the authentication database and the target database.

 

Since the single-node test also fails, this may now point more toward a limitation or compatibility issue between the Fabric MongoDB connector and your MongoDB authentication/topology configuration through the on-premises gateway.

 

Regards,

ABD

Hello @ABD128 , @v-karpurapud ,

I have received your messages and thank you for them.

I haven’t had time to make any progress on this issue, but it remains unresolved for the time being.

I will keep you informed as soon as possible.

Thank you again for your help,

Have a good day,

Vivien

Hi @vivien57 

Thanks for the update. Hope your issue gets resolved soon. when it does, please share the insights with the community as it can be helpful to others.

Regards,

Microsoft Fabric Community Support Team.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

June Fabric Update Carousel

Fabric Monthly Update - June 2026

Check out the June 2026 Fabric update to learn about new features.

Top Solution Authors