Hi @Kumpala, Deepak DEEKU Greetings! Welcome to Microsoft Q&A forum. Thank you for posting your question here. Please leverage the sample code provided in the GitHub repository to Azure IoT SDK Csharp to provision a device using Symmetric Keys. The GitHub repository has a SymmetricKeySample.cs
file with the code to provision the device. The file can be found under the directory azure-iot-sdk-csharp-main\provisioning\device\samples\how to guides\SymmetricKeySample
The code does not require any changes and you can execute the project through the command line by passing the DPS instance ID scope, Registration ID and the SAS key. Please refer the below image for reference
Upon execution of the command, you can see that the device gets provisioned on the IoT Hub. Find the below image for the reference.
Refer the instructions provided in the Quickstart: Provision a simulated symmetric key device to get more details on the steps needed to set up and execute the demo code.
Please let us know if you run into any issues or need further assistance in the comments below.
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.