Hi @Pranay Bolem Greetings! Welcome to Microsoft Q&A forum. Thank you for posting this question here.
The approach you are trying uses repository Azure IoT DPS Symmetric Key Generator for generating the connection string. The tool responsible for fetching the connection string has deprecated a long time back as mentioned in the repository. Please find the below statement.
The only functionality available in the tool is the ability to generate individual device keys from your IoT Central applications group SAS key. This is the reason why the code sample fails to fetch the connection string.
I have found an alternative approach in the EPS8266 samples which uses Azure IoT SDK C to establish the connection with IoT Central using the same parameters without relying on the connection string. You can find the underlying implementation for the connection process in the file iotc.cpp. Since this sample is built for Arduino and using Azure SDK for C, I believe this can be extended to Arduino Uno as well.
You may want to refer Azure Arduino for C SDK samples and see how you can use embed the SDK library into the device using Arduino IDE.
Hope this helps.
If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.