Azure / Azure/azure-rest-api-specs
[BUG] Microsoft.Automation - HybridRunbookWorker Create/Get returns vmResourceId in all lowercase, not preserving input casing
- 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/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/openapi.json#L2224-L2282
### API Spec version
2024-10-23
### Describe the bug
When creating a Hybrid Runbook Worker via PUT `/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}/hybridRunbookWorkers/{hybridRunbookWorkerId}`, the `vmResourceId` property in the response body is returned in all lowercase, regardless of the casing provided in the request body. The subsequent GET operation also returns the lowercased value.
### Expected behavior
`vmResourceId` property in the response should preserve the original casing provided in the request
### Actual behavior
The API returns `vmResourceId` with all segment keys and values lowercased:
### Reproduction Steps
1. Create worker with correct casing `vmResourceId`
`PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{groupName}/hybridRunbookWorkers/{workerId}?api-version=2024-10-23`
```
X-Ms-Correlation-Request-Id: a41cee88-4181-34f4-3e60-0e1c677fd572
2026-06-03T12:20:22.657+1000 [DEBUG] provider.terraform-provider-azurerm.exe: Accept-Encoding: gzip
2026-06-03T12:20:22.657+1000 [DEBUG] provider.terraform-provider-azurerm.exe
2026-06-03T12:20:22.657+1000 [DEBUG] provider.terraform-provider-azurerm.exe: {"properties":{"vmResourceId":"/subscriptions/xxx/resourceGroups/acctestRG-auto-lucia/providers/Microsoft.Compute/virtualMachines/acctestVM-lucia"}}
```
2. Perform a GET on the same resource:
`GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{groupName}/hybridRunbookWorkers/{workerId}?api-version=2024-10-23`
3. Observe the 200 OK response — vmResourceId is all lowercase:
```
{"id":"/subscriptions/xxx/resourceGroups/acctestRG-auto-lucia/providers/Microsoft.Automation/automationAccounts/acctestAA-lucia/hybridRunbookWorkerGroups/acctest-lucia/hybridRunbookWorkers/8520646a-0727-43d1-b442-26609f56b027","name":"8520646a-0727-43d1-b442-26609f56b027","type":"Microsoft.Automation/AutomationAccounts/HybridRunbookWorkerGroups/HybridRunbookWorkers","properties":{"ip":"","registeredDateTime":"2026-06-03T02:20:23.2739231+00:00","lastSeenDateTime":"0001-01-01T00:00:00+00:00","vmResourceId":"/subscriptions/xxx/resourcegroups/acctestrg-auto-lucia/providers/microsoft.compute/virtualmachines/acctestvm-lucia","workerName":"acctestvm-lucia","workerType":"HybridV2"},"systemData":{"createdAt":"2026-06-03T02:20:23.2739231+00:00","lastModifiedAt":"2026-06-03T02:20:23.2739231+00:00"}}
```
### Environment
_No response_
Contributor guide
Research direction
Start with the Microsoft.Automation 2024-10-23 OpenAPI definition at the linked lines, then compare the documented PUT and GET behavior for the hybridRunbookWorkers endpoint with the provided request and response. Done means vmResourceId returned by both operations preserves the casing supplied in the request, rather than lowercasing its path segments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100