web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Cosmos DB Delete Docum...
Power Automate
Answered

Cosmos DB Delete Document Fails

(1) ShareShare
ReportReport
Posted on by 8

I'm have very simple Power Automate using Cosmos DB connectors:

 

  1. Cosmos Get All Documents (V3)
    1. Apply to each body/Documents
      1. Cosmos Delete a document (V2)
        1. Database ID: xxx
        2. Collection ID: xxx
        3. Document ID: items('Apply_to_each')['id']

I have verified that all connections to db, collection and document Id's exist and return as expected.

I get the error:  Entity with the specified id does not exist in the system

The id does in fact exist checking in both Azure data explorer as well as the response from Get All Documents (V3). The Power Automate debugger lists the correct id in the Document ID field.

 

This one has me really confused! Thank you.

 

 

           

Categories:
I have the same question (0)
  • Verified answer
    enzocano Profile Picture
    9 on at

    I had the same problem; you should define the proper partition key to fix it.

    For example, if you partition key is `/id` you must add that to the delete step. Also, you must cast the partition key to be string by enclosing the value with double quotes ("<value>") if you are using string (reference).

     

    The following example is to delete a testcosmos document with "testcosmos" partition key

     

    enzocano_1-1654030809908.png

     

     

  • jarra64 Profile Picture
    8 on at

    Thank you @enzocano I didn't realize the double quote requirement for string partition keys. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 323 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 183 Most Valuable Professional

Last 30 days Overall leaderboard