Azure / Azure/azure-rest-api-specs

[BUG] Microsoft.Sql - jobAgents - `JobAgentIdentityType` lists unsupported types in enum

Open
#33,215 0 comments 0 reactions 0 assignees View on GitHub
bug customer-reported Mgmt question Service Attention SQL
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/sql/resource-manager/Microsoft.Sql/preview/2023-08-01-preview/JobAgents.json#L345-L350

### API Spec version

2023-08-01-preview

### Describe the bug

Based on the enum in the REST API specs it would seem that `SystemAssigned` and `SystemAssignedUserAssigned` are supported identity types, however when sending `SystemAssigned` in the request the API responds with a 400 status code.

Docs: https://learn.microsoft.com/en-us/rest/api/sql/job-agents/create-or-update?view=rest-sql-2023-08-01-preview&tabs=HTTP#jobagentidentitytype

Additionally, if `SystemAssignedUserAssigned` is to be supported, it would be great if the value was updated to `SystemAssigned, UserAssigned` to be consistent with other identity type enums.

### Expected behavior

REST API spec and documentation accurately lists supported types / service accepts all listed types.

### Actual behavior

400 Bad request error

```
performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: CannotSetResourceIdentity: Resource type 'Microsoft.Sql/servers/jobAgents' does not support creation of 'SystemAssigned' resource identity. The supported types are 'UserAssigned'.
```

### Reproduction Steps

```
PUT https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//jobAgents/?api-version=2023-08-01-preview

{
"identity": {
"type": "SystemAssigned"
},
"location": "eastus",
"name": "",
"properties": {
"databaseId": "/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases/"
},
"sku": {
"name": "JA100"
},
}
```

### Environment

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with JobAgents.json in the 2023-08-01-preview Microsoft.Sql specification, especially lines 345-350, and compare the JobAgentIdentityType enum with the linked REST API documentation. Reproduce the PUT request using SystemAssigned and verify that the enum and documentation accurately reflect the service-supported identity types; completion requires resolving the mismatch between the spec and the 400 response.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api, documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.