Hello @yabool2001 ,
you seem to try to access the IoT Hub, part of IoT Central directly.
IoT Central is the Software-as-a-Service IoT platform from Microsoft. This solution simplifies deploying IoT solutions. It uses Azure PaaS resources under the cover, including IoT Hub, Time Series Insights, Stream Analytics, and Device provisioning Services.
It's not possible to connect to device registrations in the IoT Hub directly (there was a solution in the past but that has been deprecated).
Please check out how to connect to the Azure Device provisioning Services and try it with one of the samples. There are examples for C, C#, Python, NodeJS, and Java.
You will notice the same flow is used for IoT Central.
As an alternative, perhaps the Azure IoT Central bridge could be helpful. This exposes a webhook endpoint using Azure Functions and redirects an incoming message directly to a device in IoT Central. If this device does not exist yet, it will be registered first.