Azure / Azure/azure-rest-api-specs
[Question] - When querying REST API endpoint Microsoft.RecoveryServices/vaults we receive missleading status on BCDR level from our vaults.
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 37m
- Merged PRs (30d)
- 446
Description
### API Spec link
Microsoft.RecoveryServices/vaults
### API Spec version
2024-10-01
### Question/Query
When running:
$vaults = "https://management.azure.com/subscriptions/$subscriptionId/providers/Microsoft.RecoveryServices/vaults?api-version=2024-10-01"
$vaultResponse = Invoke-RestMethod -Method Get -Uri $vaults -Headers $headers
$vaultInformation = @()
$vaultInformation = Foreach ($v in $vaultResponse.value) {
[PsCustomObject]@{
Location = $v.location
Name = $v.name
resourceGroupName = $v.id.Split("/")[4]
Sku = $v.sku.name
Tier = $v.sku.tier
Type = $v.type
ProvisioningState = $v.properties.provisioningState
bcdrSecurityLevel = $v.properties.bcdrSecurityLevel
}
}
$vaultInformation | ft -AutoSize
We receive the status "Poor" on our BCDR status for each vault.

If I then query every value in my $vaultInformation and get the specified vault:
$bcdr = @()
Foreach ($v in $vaultInformation) {
$endpoint = "https://management.azure.com/subscriptions/$subscriptionId/resourceGroups/$($v.resourceGroupName)/providers/Microsoft.RecoveryServices/vaults/$($v.name)" + "?api-version=2024-10-01"
$tempStatus = Invoke-RestMethod -Uri $endpoint -headers $headers
$bcdr += [PSCustomObject]@{
Location = $tempStatus.location
Name = $tempStatus.name
Type = $tempStatus.type
Sku = $tempStatus.sku.name
Tier = $tempStatus.sku.tier
bcdrStatus = $tempStatus.properties.bcdrSecurityLevel
}
}
$bcdr | ft -AutoSize

Also the portal itself reflects the values we see when we query each vault:

Are we looking at two different values here or does the first query here not return the correct values?
We have tried different API versions, all return "poor" on the initial query.
### Environment
VsCode latest version - Windows 10, and PowerShell 7.5.0
Contributor guide
Research direction
Start by comparing the Microsoft.RecoveryServices/vaults list response with the individual vault response for API version 2024-10-01, using the PowerShell requests shown in the issue. Determine whether bcdrSecurityLevel differs because the endpoints expose different values or because the list response is incorrect; done means documenting the confirmed behavior and the affected API specification area.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100