Home > Enterprise >  Azure Logic App CosmosDB Entity with the specified id does not exist in the system
Azure Logic App CosmosDB Entity with the specified id does not exist in the system

Time:12-02

I have an Azure Logic App that replaces a CosmosDB document. The DocumentID to be replaced in this example run is set to "JTJmbWVkaWEtc3RvcmUlMmZzdXBlcl9tYXJpb19icm9zX3RyYWlsZXIubXA0" (URL Param). When I set the DocumentID in Replace a Document (V2) it is throwing a Entity with the specified id does not exist in the system. error even though the "id" matches the DocumentID.

Logic App Error Message

I have /id as the partition key. Anyone any ideas?

CosmosDB Item Existing

Any help would be appreciated!

CodePudding user response:

Your first screenshot does not show you are passing the Partition Key. When we look at the Logic Apps docs for "Get a Document (V2)": Screenshot of parameter Partition Key value

When reading a document from Cosmos DB, both the id and Partition Key value are required, even if they are the same value (in your case /id is the Partition Key Definition).

Try adding the parameter with the same value as Document ID.

  • Related