Hi @Anonymous , Greetings! Welcome to Microsoft Q&A forum. Thank you for posting the question here. I apologize for the inconvenience this has caused you.
I would like to point that the GitHub repository you are looking at is used to connect ESP32 device with IoT Hub, but not IoT central.
There is another GitHub repository you would need to use to connect ESP32 with your Azure IoT Central. Please find the steps outlined in the GitHub repository Getting started with the ESPRESSIF ESP32 and Azure IoT Central with Azure SDK for C Arduino library which outlines the exact steps you would need to follow to connect ESP32 with Azure IoT central.
After you install the Azure SDK for C library, load the sample code that comes with library. Please refer the below image to find the sample.
Once you load the code sample into your Arduino device, configure the following parameters in the iotconfigs.h file
Note that using certificates is optional and you can connect your ESP32 to Azure IoT central just by using SAS keys in test and dev environments.
Once you save the solution and flash the code against the ESP32 from Arduino IDE, you could view from the serial monitor that the device should connect without any issues.
Hope this helps resolve your connectivity issues. Please let us know if you have any issues or further questions in the comments below.
Update
The Azure RTOS SDK sample from the reference Git Hub repository is hardcoded to talk to the DPS instance that is using the Baltimore root and not Digicert root that is required for connecting to the IoT Central application. Modifying the hardcoded URL to use the Digicert DPS endpoint made it to connect successfully.
Furthermore, the registration identity was missing from the SDK settings. Setting it to the device identity resolved the connectivity and could successfully send telemetry.
If the response helped, please do click Accept Answer and Yes. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.