Medium severitydata source
Power BI Refresh Error:
DF-Cosmos-InvalidConnectionMode
What does this error mean?
The ADF Mapping Data Flow Cosmos DB linked service specifies a connection mode that is not valid for the connector type or account configuration. Cosmos DB Mapping Data Flow connectors require the 'Gateway' connection mode.
Common causes
- 1The Cosmos DB linked service connection mode is set to 'Direct' — Mapping Data Flows require 'Gateway' mode, which routes traffic through the Cosmos DB gateway endpoint
- 2A linked service created for a Copy Activity was reused for a Mapping Data Flow without checking the connection mode setting, which has different requirements between activity types
How to fix it
- 1Open the Cosmos DB linked service in ADF Studio.
- 2Locate the 'Connection mode' property and change it to 'Gateway'.
- 3Test connection confirm the updated configuration is valid.
- 4Save the linked service and re-run the failing data flow.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-troubleshoot-guide