This section explains how to provision a gateway and how to connect to the Azure IoT Services using a SaS connection string.
The Provisioning section describes how to provision a gateway into the Azure Portal.
The Create a SaS cloud connection section describes how to create a new cloud connection in ESF and how to configure and use the TPM in the gateway to connect and authenticate into the selected Azure IoT Service.
SaS Provisioning can be accomplished using one of two ways:
- Adding a device to IoT Hub
- Adding a device to IoT Central Applications
In Microsoft Azure Portal, IoT Hub -> IoT Devices, add a new device with a device identity:
Open the device details and copy the “Connection string (primary key)” that will be used for creating the new Cloud connection:
In order to provision your device with SaS credentials using IoT Central Applications, you must first create an application. Instructions on how to create your own IoT Central application can be found
You must Create your device in your Azure IoT Central Application before provisioning using SaS credentials.
Click on your device from the Devices page and click Connect
Make sure the Connection method is set to "Shared access signature (SAS)".
Copy the ID scope and Primary Key that will be used for creating the new Cloud connection.
In the ESF Web interface, create a new Cloud Connection using Factory AzureSasCloudEndpoint
There are two methods of connection using Azure IoT Portal:
- Connect using Azure IoT Hub
- Connect using Azure IoT Central
Select the new connection and configure SasMqttDataTransport with the Connection string that has been previously copied:
Copy the *Global device endpoint** of your Azure Device Provisioning Service. Paste that into the SasMqttDataTransport Connection String following "Hostname=".
Copy the ID Scope and Primary key from your device in IoT Azure IoT Central created during SaS Provisioning. Paste into the SasMqttDataTransport Connection String following "DeviceID=" and "SharedAccessKey=" respectively.
Updated over 1 year ago