These docs are for v7.2.0. Click to read the latest docs for v7.5.0.

Legacy V2 SaS Provisioning and Connection

Overview

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.

Provisioning

SaS Provisioning can be accomplished using one of two ways:

  • Adding a device to IoT Hub
  • Adding a device to IoT Central Applications

Using IoT Hub to provision device

In Microsoft Azure Portal, IoT Hub -> IoT Devices, add a new device with a device identity:

809

Open the device details and copy the “Connection string (primary key)” that will be used for creating the new Cloud connection:

478

Using IoT Central Applications to provision device

Prerequisites

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
here.

Create a device

You must Create your device in your Azure IoT Central Application before provisioning using SaS credentials.

Connect device

Click on your device from the Devices page and click Connect

1574

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.

637

Create a SaS cloud connection

In the ESF Web interface, create a new Cloud Connection using Factory AzureSasCloudEndpoint

460

There are two methods of connection using Azure IoT Portal:

  • Connect using Azure IoT Hub
  • Connect using Azure IoT Central

Configure connection using Azure IoT Hub

Select the new connection and configure SasMqttDataTransport with the Connection string that has been previously copied:

898

Configure connection using Azure IoT Central

Copy the *Global device endpoint** of your Azure Device Provisioning Service. Paste that into the SasMqttDataTransport Connection String following "Hostname=".

898

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.

637 898