Azure / Azure/azure-rest-api-specs
IoTHub Dps API - rights property in response doesn't include the values "enrollmentRead/registrationWrite/registrationRead" when set "enrollmentRead/registrationWrite/registrationRead" as "true" in http request
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
After tested, I found rights property in response doesn't include the values "enrollmentRead/registrationWrite/registrationRead" when set "enrollmentRead/registrationWrite/registrationRead" as "true" in http request. I assume api should return them since they are set as true in http request body.
Http request to create iot dps policy:
```
PUT https://management.azure.com/subscriptions/xx-xx-xx-xx/resourceGroups/acctestRG-iotdps-test01/providers/Microsoft.Devices/provisioningServices/acctestIoTDPS-test01
{
"etag": "xxxx",
"location": "eastus2",
"properties": {
"state": "Active",
"provisioningState": "Succeeded",
"iotHubs": [],
"allocationPolicy": "Hashed",
"serviceOperationsHostName": "acctestIoTDPS-test01.xxxx.net",
"deviceProvisioningHostName": "xxxx.xxxx.net",
"idScope": "0ne00151A0D",
"authorizationPolicies": [
{
"keyName": "provisioningserviceowner",
"primaryKey": "xxxxxxx",
"secondaryKey": "xxxxxxx",
"rights": "ServiceConfig, DeviceConnect, EnrollmentWrite"
},
{
"keyName": "acctest01",
"rights": "EnrollmentRead, EnrollmentWrite, RegistrationStatusRead, RegistrationStatusWrite"
}
]
},
"sku": {
"name": "S1",
"tier": "Standard",
"capacity": 1
},
"tags": {}
}
```
Http request to get iothub dps policy:

Contributor guide
Research direction
Start by comparing the IoT DPS policy creation request with the reported get-policy response, focusing on authorizationPolicies and the rights field. Trace the API specification entry for these requests and determine whether the response is expected to preserve enrollmentRead, registrationWrite, and registrationRead; done means the documented behavior matches the service response or clearly records the required correction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100