Forum Discussion
MongoDB Atlas SQL connection using 2 connections with 1 data gateway problem
- 1 year ago
Hi Anonymous
I contacted Microsoft support and they were helping me, but finally I managed to find a solution with my colleagues. It turns out that it is possible to create a kind of ‘view’ in a section that Mongo Atlas offers called Data Federation. There I put together both collections, each one from a different cluster and I only needed one connection for both Desktop and Service.
So as this has helped me, I'll give this answer as a solution.
Anyway, thank you very much for the help provided in your comments!
Hi nbustos,
Thanks for reaching out to the Microsoft fabric community forum.
Based on what you've described, the issue seems to be related to how Power BI Service handles multiple connections to the same data source (MongoDB Atlas in this case) via ODBC and a gateway.
This behavior isn’t a MongoDB-specific limitation it’s how Power BI handles ODBC and gateway connections in the service. If the connection strings aren’t exactly identical, Power BI sees them as separate and requires separate credential configuration.
In Power BI Desktop, you're able to define separate connections for each collection without issue, but when the report is published, the service expects each unique data source (including different connection strings) to be configured and credentialed individually in the gateway settings.
Please try these steps to fix the issue:
* Go to the Power BI Service -> Manage Gateways. Under your gateway cluster, you should see both connections listed separately, even if they’re pointing to the same MongoDB server, Power BI treats them as separate if their connection strings differ in any way (database name, collection, parameters, etc.).
* Make sure both data sources are configured and credentials are set. For each listed connection click "Edit Credentials" then re-enter the correct authentication details (likely basic or username/password). Make sure privacy level settings are consistent for both connections.
* Verify that your dataset in the workspace is mapped to the correct gateway and both data sources.
I would also take a moment to thank Irah24, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
- Anonymous1 year agoNot applicable
Hi nbustos,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you. - nbustos1 year agoFrequent Visitor
Hi Anonymous, thanks for replying to my problem!
I can see both connections separatedly but in the same gateway and working correctly:
Also in the report semantic model, I can see both connections separated and working too:
The credentials of both connecionts are right because I have been testing using only one connection with both of them and it works without any problem.
Even with all this, still not working.
- Anonymous1 year agoNot applicable
Hi nbustos,
Since both MongoDB ODBC connections are correctly configured, mapped, and online in your gateway, and the semantic model is detecting and mapping them properly, we can rule out basic credential or mapping issues.
From here, a couple of deeper things to check:
* Check privacy level settings. Even though this is more commonly an issue in Power BI Desktop, the service still enforces data isolation rules. Please verify the privacy levels on both connections in the gateway settings. Go to Manage Gateways > Each connection > Edit credentials. Make sure both have the same privacy level (e.g., Organizational or None). A mismatch here can silently cause issues with data combination.
* Re-publish with reconfigured source (Same DSN). Since you're connecting to two collections from the same MongoDB server, try this as a workaround. In Power BI Desktop, edit the queries so both collections use the same DSN/connection string, and branch off from there. This may mean querying the full database and then filtering by collection/table within Power BI. This helps Power BI treat the data as coming from a single source, avoiding multi-connection schema confusion in the service.
* Make sure your on-premises gateway is running the latest version. An outdated gateway has been known to cause DM_GWPipeline_Gateway_InvalidConnectionCredentials errors with custom connectors or ODBC drivers.
If all of the above are verified and it’s still not resolving, it could be a limitation or bug in how Power BI handles multiple ODBC Mongo connections through the gateway. In that case, I’d recommend raising a support ticket with Microsoft directly.
Please refer below link on how to raise a contact support or support ticket.
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft LearnBest Regards,
Hammad.
- Anonymous1 year agoNot applicable
Hi nbustos,
I wanted to follow up on our previous conversation. Has your issue been resolved or were you able to raise a support ticket with Microsoft Fabric Support?
Your feedback would be greatly appreciated, as it can help us better understand and address similar issues in the community.
Thank you.