Skip to content

Commit a52f3c5

Browse files
authored
Merge pull request #11986 from formulahendry/patch-2
Add Azure IoT Toolkit to generate SAS Token
2 parents f3cff55 + c7e1d1a commit a52f3c5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

articles/iot-hub/iot-hub-mqtt-support.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ If a device cannot use the device SDKs, it can still connect to the public devic
7474
7575
For more information about how to generate SAS tokens, see the device section of [Using IoT Hub security tokens][lnk-sas-tokens].
7676

77-
When testing, you can also use the [device explorer][lnk-device-explorer] tool to quickly generate a SAS token that you can copy and paste into your own code:
77+
When testing, you can also use the [Device Explorer][lnk-device-explorer] tool or the cross-platform [Azure IoT Toolkit extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit) to quickly generate a SAS token that you can copy and paste into your own code:
78+
79+
For Device Explorer:
7880

7981
1. Go to the **Management** tab in **Device Explorer**.
8082
2. Click **SAS Token** (top right).
@@ -88,6 +90,13 @@ If a device cannot use the device SDKs, it can still connect to the public devic
8890
The part of this token to use as the **Password** field to connect using MQTT is:
8991

9092
`SharedAccessSignature sr={your hub name}.azure-devices.net%2Fdevices%2FMyDevice01%2Fapi-version%3D2016-11-14&sig=vSgHBMUG.....Ntg%3d&se=1456481802`
93+
94+
For Azure IoT Toolkit:
95+
96+
1. Expand the **AZURE IOT HUB DEVICES** tab in the bottom left corner of Visual Studio Code.
97+
2. Right-click your device and select **Generate SAS Token for Device**.
98+
3. Set **expiration time** and press 'Enter'.
99+
4. The SAS token is created and copied to clipboard.
91100

92101
For MQTT connect and disconnect packets, IoT Hub issues an event on the **Operations Monitoring** channel. This event has additional information that can help you to troubleshoot connectivity issues.
93102

0 commit comments

Comments
 (0)