Medium severitydata source
Power BI Refresh Error:
DF-Cosmos-DeleteDataFailed
What does this error mean?
The ADF Mapping Data Flow Cosmos DB sink failed to delete data from the target container. The delete operation was rejected by Cosmos DB, which prevents the data flow from completing the write step.
Common causes
- 1The Cosmos DB account key or service principal used by the linked service lacks write/delete permissions on the target container
- 2The sink is configured for 'delete' row type but the incoming stream does not include a valid partition key value, which Cosmos DB requires to locate and delete the document
- 3The target Cosmos DB container has a TTL (Time to Live) or change feed conflict that prevents the delete operation from succeeding
How to fix it
- 1Open the failing data flow in ADF Studio and inspect the Cosmos DB sink transformation settings.
- 2Verify the sink row type is set correctly — if 'delete' is selected, confirm the partition key column is mapped and contains non-null values.
- 3Test connection the Cosmos DB linked service to confirm the account key or credentials are still valid.
- 4In the Azure portal, check the Cosmos DB account keys — regenerated or expired keys break the linked service silently.
- 5Enable data flow Debug mode and preview the sink input to confirm the documents being targeted for deletion exist and have valid partition keys.
- 6Review the Cosmos DB diagnostic logs in Azure Monitor for 403 (forbidden) or 404 (not found) errors during the same time window.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-troubleshoot-guide