# Node red Azure IOT Hub Registry

**URL:** <https://discourse.nodered.org/t/node-red-azure-iot-hub-registry/6799>\
**Category:** General\
**Created:** [14 January 2019 15:58 UTC](https://discourse.nodered.org/t/node-red-azure-iot-hub-registry/6799 "2019-01-14T15:58:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ers](https://avatars.discourse-cdn.com/v4/letter/e/f9ae1b/32.png) [@ers](https://discourse.nodered.org/u/ers)\
**Post date:** [14 January 2019 15:58 UTC](https://discourse.nodered.org/t/node-red-azure-iot-hub-registry/6799/1 "2019-01-14T15:58:52Z")

</div>

When I try to register my device to Azure IOT Hub using the 'Azure IOT Hub Registry' Block, I get the following error message:

Error while trying to create a new device: UnauthorizedError: Unauthorized

My inject node has the correct jason format as:  
{"deviceId":"TestDevice"}

The 'Azure IOT Hub Registry Node" has the connection string of the IOT Hub.

Has anyone encountered the same problem recently?
