Enable Partition Key delete feature for Cosmos account

Pavan Kumar Jannaikode 20 Reputation points Microsoft Employee
2025-04-20T20:02:37.8033333+00:00

Hi,

I need to use the API DeleteAllItemsByPartitionKeyStreamAsync (https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-delete-by-partition-key?tabs=dotnet-example) for one of my usecase. I enabled the DeleteAllItemsByPartitionKey capability by following the document and setting it up in a lower environment. I have following doubts, can someone please help me with them questions:

  1. Should I be adding this capability manually on all the accounts that I want this capability?
  2. Can this be handled through an automated ARM templates?
  3. Will reaching out to Support with the list of the accounts help so the support can add it in bulk?

Thanks,
Pawan

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,906 questions
{count} votes

Accepted answer
  1. Vahid Ghafarpour 23,385 Reputation points Volunteer Moderator
    2025-04-21T02:39:16.3466667+00:00

    https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-delete-by-partition-key?tabs=dotnet-example

    Unfortunately, The feature is not enabled by default, so you must configure it for each account separately.

    For sure, you can enable the capability using Azure Resource Manager (ARM) templates or Azure CLI.

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful **

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Pavan Kumar Jannaikode 20 Reputation points Microsoft Employee
    2025-05-15T08:27:53.2033333+00:00

    Thank you @Manasa Akula and @Vahid Ghafarpour for your prompt responses. I actually followed the CLI approach to enable it manually. Also good to know that this feature is not yet supported through ARM templates.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.