Azure / Azure/azure-rest-api-specs
[BUG] DataProtection@2025-09-01 - `BackupVaults_CreateOrUpdate` fails to respond with accepted content
- 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/blob/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/DataProtection/stable/2025-09-01/dataprotection.json#L570
### API Spec version
2025-09-01
### Describe the bug
The API responds with a 406 when the `Accept` header includes a charset, e.g. `Accept: application/json; charset=utf-8`.
This used to work fine, as this has been a part of the requests sent by the AzureRM provider for a long time ~~but as of a couple days ago~~ this is now the response on failed requests (e.g. 400s)
Edit: after more investigation this has been an issue for longer than a few days
Encountered on `2025-09-01` however it appears this behaviour is consistent across all API versions (tested up until `2023-01-01`
### Expected behavior
API produces a response matching the accepted content
### Actual behavior
406 status code
### Reproduction Steps
Create a backup vault with an invalid value for one of the properties (`properties.securitySettings.ImmutabilitySettings.State` in this example) and ensure the request contains an `Accept` header specifying `charset=utf-8` (or any other, the type doesn't appear to matter)
```
PUT https://management.azure.com/subscriptions/{subscriptionID}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{backupVaultName}?api-version=2025-09-01
{
"identity": {
"type": "None"
},
"location": "westeurope",
"properties": {
"storageSettings": [{
"type": "LocallyRedundant",
"datastoreType": "VaultStore"
}],
"securitySettings": {
"immutabilitySettings": {
"state": "Foo"
}
}
},
"tags": {}
}
```
### Environment
Terraform
Contributor guide
Research direction
Start with the DataProtection API specification at specification/dataprotection/resource-manager/Microsoft.DataProtection/DataProtection/stable/2025-09-01/dataprotection.json#L570 and review the BackupVaults_CreateOrUpdate definition. Reproduce the PUT request using the supplied invalid immutability state and Accept header, then compare the documented response contract with the observed 406. Done means identifying the appropriate specification change or confirming that the behavior must be fixed outside this repository.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, terraform
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100