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.

Open
#33,564 0 comments 0 reactions 0 assignees View on GitHub
customer-reported question Recovery Services Service Attention
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.

![Image](https://github.com/user-attachments/assets/dcec6147-2e03-466e-a82b-70576c883292)

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

![Image](https://github.com/user-attachments/assets/d538d80c-2f17-400f-9df3-cc1d5bc90e42)

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

![Image](https://github.com/user-attachments/assets/25ac9e65-1c13-43b4-9cff-9e8d143bca39)

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.