2
votes

While trying to provision device through Azure DPS is not working. it is giving error.

Unhandled Exception: Microsoft.Azure.Devices.Provisioning.Client.ProvisioningTransportException: AMQP transport exception ---> Microsoft.Azure.Amqp.AmqpException: {"errorCode":401002,"trackingId":,"message":"IotHubUnauthorizedAccess",}

I am using same x509 certificate which was used at the time of enrollment. Scope id is also correct. Any help will be appreciated.

1
can you share the code for which you are facing the error?iAviator

1 Answers

0
votes

You will get this transport exception if the Common Name "CN=" value within the device x.509 certificate does not match the Group Enrollment name within DPS.

This link may be usefull: https://github.com/Azure/azure-iot-sdk-c/blob/master/tools/CACertificates/CACertificateOverview.md