You need to enable the feature first before consuming it, you can follow the steps below
How to enable partition key delete feature for my Azure cosmos account?
Sharuk Abdul Gafoor
0
Reputation points
var deleteResponse = await container.DeleteAllItemsByPartitionKeyStreamAsync(new PartitionKey(partitionKey));
I have used this code snippet from referring - https://video2.skills-academy.com/en-us/azure/cosmos-db/nosql/how-to-delete-by-partition-key?tabs=dotnet-example
Getting exception: Message: {"Errors":["Partition key delete feature is disabled for this account. Please contact Azure Support [https://azure.microsoft.com/support] to enable it."]}
1 answer
Sort by: Most helpful
-
Sajeetharan 2,031 Reputation points Microsoft Employee
2024-06-26T10:49:31.8366667+00:00