@Andrew Hopkinson
I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!
Issue:
Can I connect directly to CosmosDB from ADF using the key vault?
I am trying to set up an azure key vault key to connect from Azure Data Factory directly to CosmosDB. I am following this link but it seems to be for a web app service.
This creates two secret key names which doesn't work with ADF. Is there a way to connect directly to cosmos using the key vault? I am able to connect to the key vault from ADF. We tried setting up a secret value in the key vault using the "Connection String" value from cosmos but when I select this from the drop down in ADF,
I get this error message:
Expecting connection string of format "key1=value1; key2=value2".
Solution:
The issue was that the connection string copied from the the cosmos resource did not include the database name. I had to include ";Databasename=[cosmosdbname]" to end of the secret value in the Azure Key Vault and it worked.
This is not well documented and the error message is not clear. The only way I found this was by hovering over the very tiny "i" beside the secret word in ADF for the key vault authentication.
If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.
I hope this helps!
If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.