Node red Azure IOT Hub Registry

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?