Skip to content

[BUG] Missing method to retrieve analyze result by ID #49842

Open
@ievgen-pavlenko

Description

@ievgen-pavlenko

Library name and version

Azure.AI.DocumentIntelligence v1.0.0

Describe the bug

n version 1.0.0 of the Azure.AI.DocumentIntelligence SDK, there is no available method to retrieve the status or result of an analysis operation using the operation ID, unless you wait for the full completion of the process via WaitUntil.Completed.
While AnalyzeDocumentAsync(WaitUntil.Started, ...) allows starting the analysis and immediately returning control, there is no follow-up method to poll or retrieve the result later using the operation ID. This limits flexibility in long-running operations, especially in non-blocking or distributed processing scenarios.

However, the corresponding REST API does support this pattern. According to the official documentation (Get Analyze Result – REST API), it is possible to fetch the result using the operation ID after submission, which is not currently supported in the SDK.

Expected behavior

The SDK should expose a method (e.g., GetAnalyzeResultAsync(string operationId) or similar) that allows users to retrieve the result of a previously started document analysis operation using the operation ID, consistent with the capabilities of the REST API.

This would bring the SDK to feature parity with the REST API and enable more advanced use cases such as distributed processing or job tracking.

Actual behavior

Calling AnalyzeDocumentAsync with WaitUntil.Started starts the analysis operation and returns an Operation<AnalyzeResult> object, but there is no method available to later retrieve the result using the operation ID or URI.

As a result, once the method returns, there is no supported SDK way to check the status or fetch the final result unless WaitUntil.Completed was used initially. This prevents scenarios where the result is intended to be processed at a later time or from a different service context.

There is no method like client.GetAnalyzeResultAsync(...) or similar to resume/poll the operation. This makes the "Start only" usage incomplete in practice.

Reproduction Steps

var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey));

using var stream = File.OpenRead("example.pdf");

// Start document analysis without waiting for completion
var operation = await client.AnalyzeDocumentAsync(WaitUntil.Started, "prebuilt-read", stream);

// At this point, there is no SDK method to later fetch the result using operation.Id
// operation.WaitForCompletionAsync() is not usable if you want to retrieve it later

// There should be a method like:
// var result = await client.GetAnalyzeResultAsync(operation.Id);
// But no such method exists in the SDK

Expected output: ability to resume the operation by ID
Actual output: no API available to poll or resume the analysis once started

Environment

No response

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Cognitive - Form Recognizercustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions