@RSD
No ,there is currently no supported output variable, native parameter, or API response from PowerPlatformDeployPackage@2 that returns the Dataverse CorrelationId or msprov_operationhistory primary key back to the calling pipeline.
The Execution ID in the DevOps console log is a client-side identifier used by the local Package Deployer runtime — it is entirely decoupled from the server-generated CorrelationId and AsyncOperationId created in Dataverse. The task intentionally swallows the underlying Dataverse API responses and does not surface them as pipeline output variables. Microsoft acknowledged this in GitHub issue #209 for powerplatform-build-tools.
The workaround — Build ID Injection pattern:
Since you cannot retrieve the ID from the deployment task you must force the deployment to send a unique identifier to Dataverse that you can query later. Make the package name unique per pipeline run.
Step 1 — Inject Pipeline Run ID during build:
Do not use a static package name. Dynamically append the Azure DevOps Build.BuildId or a generated GUID to the package name during your CI build phase.
Example: FandO_DeploymentPackage_Run$(Build.BuildId).zip
Step 2 — Deploy the uniquely named package:
Pass this to PowerPlatformDeployPackage@2. The Package Deployer submits this exact string to Dataverse.
Step 3 — Query Dataverse post-deployment:
Add a PowerShell task invoking the Dataverse Web API:
GET [OrgURI]/api/data/v9.2/msprov_operationhistories?$filter=contains(msprov_packagename,'FandO_DeploymentPackage_Run12345')
Because the Run ID is mathematically tied to the specific pipeline attempt this query returns exactly one record — no timestamp guessing, no race conditions, deterministic correlation every time.
This approach holds even if two deploys to the same environment happen concurrently because each carries a unique BuildId in the package name.
If it helps, Mark as answered.