An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
Hi @Sean Leino - operation.Id is the result ID, so you're already passing the right thing.
string resultID = operation.Id;
204 No Content is a success code. and that's by design. DELETE is idempotent, so deleting something that doesn't exist still succeeds. That's why any value you pass comes back 204, and it's why the status code will never distinguish "removed your result" from "there was nothing there."
The method reference also describes it as "Mark the result of document analysis for deletion", so there isn't a synchronous delete to observe even in principle.
To verify the DELETE outside the SDK. Take a real operation.Id, GET {endpoint}/documentintelligence/documentModels/{modelId}/analyzeResults/{resultId}, and you should get the result back. Delete it, GET again, and you should get a 404. That proves two things at once: that operation.Id is the correct value, and that the delete does what you want. After that you can treat the 204 as sufficient, because you've confirmed the mechanism works.
Help make this community better for everyone: if this answer resolved your issue, please accept it or leave an upvote. If not, share more details in a comment so we can continue the discussion and find the right solution.