azure-iot-sdk-c icon indicating copy to clipboard operation
azure-iot-sdk-c copied to clipboard

The version of the Provisioning API is not up to date

Open cecilia-barnhill-cubic opened this issue 1 year ago • 1 comments

in the current version of the sdk, the prov api version is 2019-03-31 https://github.com/Azure/azure-iot-sdk-c/blob/6b7753837ee18d2198759aa625d99081e255248f/provisioning_client/inc/azure_prov_client/prov_client_const.h#L18

the latest version supported by the dps is 2021-06-01 https://learn.microsoft.com/en-us/rest/api/iot-dps/device/runtime-registration/register-device?view=rest-iot-dps-device-2021-06-01

This didn't seem to cause issues for certain types of certificates - the certs generated using the Microsoft certGen.sh were able to provision without issue, but upon switching to production certificates, we received the below json: {"errorCode":401002,"trackingId":"701c9c8f-e467-47d8-8a01-c805a19ab22a","message":"Unauthorized","timestampUtc":"2024-02-08T18:13:04.331944Z"} I was able to verify the api version impacted the response using curl and I updated the PROV_API_VERSION, rebuilt the sdk, and have our devices provisioning successfully.

cecilia-barnhill-cubic avatar Feb 09 '24 02:02 cecilia-barnhill-cubic

#2584

ericwolz avatar Feb 26 '24 19:02 ericwolz

fixed in PR

ericwolz avatar Feb 26 '24 23:02 ericwolz