MetricSign
EN|NLRequest Access
Medium severitydata source

Power BI Refresh Error:
DF-Cosmos-InvalidAccountConfiguration

What does this error mean?

The ADF Mapping Data Flow Cosmos DB linked service points to an account that cannot be resolved or accessed. The account URI, database name, or account key in the linked service configuration is incorrect.

Common causes

  • 1The Cosmos DB account URI in the linked service is incorrect — a typo in the account name portion of the URI (e.g., https://wrong-account.documents.azure.com:443/)
  • 2The Cosmos DB account was deleted or moved to a different subscription, but the linked service still references the old URI
  • 3The account key in the linked service was overwritten with an invalid value during a manual edit

How to fix it

  1. 1Open the Cosmos DB linked service in ADF Studio and click 'Test connection' — the error message will indicate whether the account is unreachable or the key is invalid.
  2. 2Go to the Azure portal → your Cosmos DB account → Keys and copy the Primary connection string or the URI and Primary key separately.
  3. 3Update the linked service with the correct URI and key from the Azure portal.
  4. 4If the account no longer exists, recreate the Cosmos DB account or update the linked service to point to the correct replacement account.

Frequently asked questions

Where do I find the Cosmos DB account URI?

In the Azure portal, go to the Cosmos DB account → Overview. The URI appears as the account endpoint: https://{account-name}.documents.azure.com:443/.

Can this error be caused by a key rotation?

Yes — if the primary key was rotated and the linked service was not updated, the connection fails with an account configuration error.

Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-troubleshoot-guide

Other data source errors