Azure / Azure/azure-rest-api-specs

IoT Hub Device Provisioning API doesn't return EnrollmentRead/RegistrationStatusRead/RegistrationStatusWrite value when set them as true

Open
#9,285 1 comment 0 reactions 0 assignees View on GitHub
IoT Service Attention
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:
![image](https://user-images.githubusercontent.com/19754191/80682865-df86de80-8af5-11ea-810f-ceaeade497a9.png)

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.