Azure / Azure/azure-rest-api-specs

[BUG] DeploymentPropertiesExtended not returning duration

Open
#33,730 0 comments 0 reactions 0 assignees View on GitHub
bug customer-reported question
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/tree/d6654fceb900fd56480f4c9904094461bac7e012/specification/resources/resource-manager/Microsoft.Resources

### API Spec version

2021-04-01

### Describe the bug

When calling the Deployments - List By Resource Group the `duration` property is not returned for any deployment created after March 18 2025. I checked multiple subscription across multiple tenant and locations. In every case the `duration` property in the DeploymentPropertiesExtended object is not returned. It's not that it is returning blank, the property isn't even listed in the return JSON.

The screenshot below shows two different deployments from the same resource group. One from February 2025 and one from April 2025. The April one does not include the duration property.

![Image](https://github.com/user-attachments/assets/3e9ad36a-288b-4c4f-a964-c221a38e74d5)

### Expected behavior

Running the request will return all deployments from a resource group. The returned objects will contain the duration property under the properties object.

### Actual behavior

The the `duration` property in the properties object is not returned. It's not that it is returning blank, the property isn't even listed in the return JSON.

### Reproduction Steps

Run the https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/?api-version=2021-04-01 against any resource group that has had a deployment after March 18 2025.

### Environment

I tested this using the Invoke-AzRestMethod PowerShell cmdlet. I used the script block below to check an entire subscription.

```powershell
$deployments = Get-AzResourceGroup | ForEach-Object{
$AzRestResults = Invoke-AzRestMethod -Path "$($_.ResourceId)/providers/Microsoft.Resources/deployments/?api-version=2021-04-01" -Method Get
if($AzRestResults.Content){
$AppRgDeployments = ($AzRestResults.Content | ConvertFrom-Json).value
$AppRgDeployments | Select-Object @{l='State';e={$_.properties.provisioningState}}, @{l='Duration';e={$_.properties.duration}}, @{l='timestamp';e={$_.properties.timestamp}}, *
}
}
$deployments | sort timestamp | FT -au
```

Contributor guide

Open the contributing guide

Research direction

Start with the linked Microsoft.Resources API specification for version 2021-04-01 and reproduce the deployments list request against a resource group with a post-March 18, 2025 deployment. Compare the response's DeploymentPropertiesExtended properties with the February and April examples; done means determining whether the specification or the service response accounts for the missing duration property.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi, powershell
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.