Azure / Azure/azure-rest-api-specs
IoT Hub Device Provisioning API doesn't return EnrollmentRead/RegistrationStatusRead/RegistrationStatusWrite value when set them as true
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 37m
- Merged PRs (30d)
- 446
Description
Symptom:
IoT Hub Device Provisioning Service API doesn't return EnrollmentRead/RegistrationStatusRead/RegistrationStatusWrite value in Rights property when set them as true in request body. API should return them since I specified them in the request body, right?
Rest api call:
```
PUT https://management.azure.com/subscriptions/xx-xxx-xxx-xx/resourceGroups/acctestRG-xxxxxx/providers/Microsoft.Devices/provisioningServices/acctestIoTDPS-xxxxx
{
"etag": "xxxxxxxx",
"location": "westus2",
"properties": {
"state": "Active",
"provisioningState": "Succeeded",
"iotHubs": [],
"allocationPolicy": "Hashed",
"serviceOperationsHostName": "acctestIoTDPS-xxxxxx.azure-devices-provisioning.net",
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"idScope": "xxxxxxxx",
"authorizationPolicies": [
{
"keyName": "provisioningserviceowner",
"primaryKey": "xxxxxxxx",
"secondaryKey": "xxxxxxxxxx",
"rights": "ServiceConfig, DeviceConnect, EnrollmentWrite"
},
{
"keyName": "acctest",
"rights": "EnrollmentRead, EnrollmentWrite, RegistrationStatusRead, RegistrationStatusWrite, ServiceConfig"
}
]
},
"sku": {
"name": "S1",
"tier": "Standard",
"capacity": 1
},
"tags": {}
}
```
API Response:

Contributor guide
Research direction
Start by locating the IoT Hub Device Provisioning Service specification for the provisioningServices endpoint and compare the authorizationPolicies request and response schemas. Reproduce the PUT request with the listed Rights values, then confirm whether the specification or service response omits them; done means the expected rights behavior is represented consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100