Azure / Azure/azure-rest-api-specs
[BUG] DeploymentPropertiesExtended not returning duration
- 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.

### 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
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