Get SAS-Token from the VS-Code

  1. Install VS-Code - https://code.visualstudio.com/download
  2. Start the VS-Code
  3. On the left side click Extensions, search for azure iot hub and select the Azure IoT Hub:
  4. Click Install:
  5. When installation is finished, an Azure Icon is shown on the left side. Click on Sign in to Azure:
  6. In the Explorer – the section AZURE IOT HUB is shown:
  7. You can now see your Hub which you created:
  8. Expand Devices and click Set IoT Hub Connection String. Now a Pop-up is shown where you have to paste the primary connection string from Security Settings > Shared access > iothubowner and click ENTER:
  9. You can now see your device under Devices:
  10. Right-Click on device1 and select Generate SAS Token for Device:
  11. Enter an expiration time and click ENTER:
  12. The SAS Token is copied to your clipboard and shown in VS-Code’s OUTPUT window: