We're building an Azure DevOps Release pipeline for a Finance & Operations (UDE) environment. Because deploys can take well over an hour and our team routinely cancels the pipeline stage after a few minutes (the deploy continues server-side regardless), we built a separate mechanism to confirm the real deploy outcome asynchronously: a script polls the msprov_operationhistory table in Dataverse, filtering for msprov_name eq 'Deploy', to find the record and read its statuscode.
The problem: we have no reliable way to know, from the pipeline side, which msprov_operationhistory record corresponds to our specific deploy attempt, especially if two deploys to the same environment happen close together (e.g., a retry after a cancellation).
What we've already ruled out:
The PowerPlatformDeployPackage@2 task doesn't expose CorrelationId or AsyncOperationId as an output variable.
msprov_operationproperties (the JSON blob on the record) contains a PackageName, but we confirmed it's not unique per run — the same filename gets reused across unrelated deploys.
Auditing is off by default on this table, and even if enabled, wouldn't retroactively help, and doesn't add a controllable/unique value anyway.
The "Execution Id" GUID printed in the Deploy Package task's own console log does not match either CorrelationId or AsyncOperationId on the resulting Dataverse record.
As a fallback, we're filtering by msprov_startedon ge <timestamp>, using the timestamp our pipeline queued the deploy attempt (via the Release REST API). This narrows the window a lot but doesn't fully rule out a genuinely concurrent deploy to the same environment landing a more recent record in that same window.
Our question: Is there any supported field, output variable, or API (existing today, even if undocumented) that lets a calling pipeline learn the CorrelationId (or any other unique identifier) of the msprov_operationhistory record that a specific PowerPlatformDeployPackage@2 execution will create — either synchronously as a task output, or via some lookup we're missing? Or is exposing this as a task output variable something that could be considered for a future release of the Power Platform Build Tools?
Thanks in advance for any pointers.

Report
All responses (
Answers (