Azure / Azure/azure-rest-api-specs
[BUG] Machine Learning Batch Endpoint - incorrect `AuthMode` Enum
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2025-12-01/openapi.json
### API Spec version
2025-12-01, 2025-06-01, 2025-09-01
### Describe the bug
The API definition and the [documentation](https://learn.microsoft.com/en-us/rest/api/azureml/batch-endpoints/create-or-update?view=rest-azureml-2025-12-01&tabs=HTTP#endpointauthmode) indicate that the following three Authentication mode are accepted:
- `AMLToken`
- `Key`
- `AADToken`
But the API only support `AADToken` as valid authentication mode and throws error in other cases.
Because of this, the `EndpointAuthKeys` is also irrelevant.
### Expected behavior
The resource creation should work with any of the three authentication modes.
### Actual behavior
"code": "UserError",
"details": [],
"message": "The Endpoint request provided has the following validation errors. Please resolve them and try again.\nErrors:\n[\n {\n \"PropertyName\": \"AuthMode\",\n \"ErrorMessage\": \"AuthMode must be 'AADToken'.\",\n \"AttemptedValue\": \"AMLToken\",\n \"ErrorCode\": \"ArgumentInvalid\"\n }\n]\n"
}
### Reproduction Steps
```
...
resource "azurerm_machine_learning_workspace" "test" {
name = "mlw-2356"
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
application_insights_id = azurerm_application_insights.test.id
key_vault_id = azurerm_key_vault.test.id
storage_account_id = azurerm_storage_account.test.id
identity {
type = "SystemAssigned"
}
}
resource "azapi_resource" "test2" {
type = "Microsoft.MachineLearningServices/workspaces/batchEndpoints@2025-12-01"
name = "mlw-be-2356"
parent_id = azurerm_machine_learning_workspace.test.id
location = azurerm_resource_group.test.location
body = jsonencode({
properties = {
authMode = "AMLToken"
}
})
}
```
### Environment
Platform : Linux
Platform Release : 6.6.87.2-microsoft-standard-WSL2
Platform Version : #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025
Architecture : x86_64
Processor : x86_64
Python Version : 3.12.3 (main, Mar 3 2026, 12:15:18) [GCC 13.3.0]
Contributor guide
Research direction
Start with the linked specification/machinelearningservices resource-manager openapi.json and inspect the batch endpoint authMode definition and EndpointAuthKeys. Compare those declarations with the documented behavior and reproduced validation error; done means the repository change, if applicable, accurately reflects the confirmed service contract and has suitable validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- api, cloud, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100