---
updatedAt: 2025-11-05T20:39:23.000Z
agentTools:
  projectIndex: https://esf.eurotech.com/v7.2.0/llms.txt
---

# TPM Provisioning and Connection

# Overview

This section explains how to provision a gateway and how to connect to the Azure IoT Services using a TPM-enabled gateway. This connection method can only be used with IoT Hub DPS Individual Enrollment or IoT Central Individual Enrollment.

> 🚧 ESF Cloud Connector for Azure IoT, Version 2.0.0 and Above Only
>
> These instructions apply to the ESF Cloud Connector for Azure IoT, Version 2.0.0 and above.  See [Legacy v2 Azure IoT Connection](https://esf.eurotech.com/v7.2.0/docs/esf-cloud-connector-for-azure-iot-hub-new-legacy-v2) if you are using any version under 2.0.0.

# Prerequisites

## TPM Parameters

The Azure cloud connection provider has created a new service: **TPMInfoService**, containing the parameters of the TPM detected on the gateway. This information will be needed in the instructions below to provision your device.

![1142](https://files.readme.io/a417fe5-tpm-service-prov.png "tpm-service-prov.png")

> 📘 Copy the Entire Endorsement Key
>
> The Endorsement Key is very long. When you copy this information into the Azure Portal (below), make sure you copy the entire key.

# Provisioning

TPM Provisioning can be accomplished in two ways:

* Start at [Provision Device Using IoT Hub DPS Individual Enrollment](#provision-device-using-iot-hub-dps-individual-enrollment) for IoT Hub DPS Individual Enrollment
* Start at [Provision Device Using IoT Central Individual Enrollment](#provision-device-using-iot-central-individual-enrollment) for IoT Central Individual Enrollment

## Provision Device Using IoT Hub DPS Individual Enrollment

Go to the **Manage Enrollments** page of your DPS in your Azure Portal and click **+ Add individual enrollment**.

![2724](https://files.readme.io/7e75935-tpm-new-ind-enrollment.png "tpm-new-ind-enrollment.png")

On the **Add Enrollment** page, enter the following information:

* **Mechanism**: TPM
* **Endorsement Key**: Copy/Paste the **Endorsement Key** from the TPMInfoService
* **Registration ID**: Copy/Paste the **Registration ID** from the TPMInfoService
* **IoT Hub Device ID**: This can be any unique designator. A good method to ensure this is unique is to use the gateway's MAC address and serial number (in the format \[MACAddress]-\[SerialNumber])
* **All other fields**: Leave at the default values

Click **Save**.

![818](https://files.readme.io/522f139-tpm-add-enrollment.png "tpm-add-enrollment.png")

Continue at [Create a TPM cloud connection](#create-a-tpm-cloud-connection).

## Provision Device Using IoT Central Individual Enrollment

### Prerequisites

#### Create an Application

In order to provision your device with TPM 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](https://docs.microsoft.com/en-us/azure/iot-central/core/quick-deploy-iot-central).

#### Create a Device

You must [Create your device](https://esf.eurotech.com/v7.2.0/docs/create-a-device-in-iot-central-applications) in your Azure IoT Central Application before provisioning using TPM credentials.

> 🚧 When you create a device, the **Device ID** field must match the **Registration ID** from the **TPMInfoService**.

### Connect device

Click on your device from the **Devices** page and click **Connect**

![1574](https://files.readme.io/864f8d5-2ae9853-azure-iot-central-connect-device.png "2ae9853-azure-iot-central-connect-device.png")

Set the **Authentication Type** to "Individual enrollment" and **Authentication Method** to "TPM".

Copy/paste the **Endorsement Key** from the ESF TPMInfoService, then click **Save**, then **Close**.

![3352](https://files.readme.io/d8d4c18-cad-iot-central.png "cad-iot-central.png")

Continue at [Create a TPM cloud connection](#create-a-tpm-cloud-connection).

# Create a TPM cloud connection

In the ESF Web interface, go to the **Cloud Connection** section and click **New Connection**.

On the **New Cloud Connection** dialog, enter the following information:

* **Cloud Connection Factory PID**: AzureDpsTpm
* **Cloud Connection Service PID**: AzureDpsTpm or other valid Cloud Connection Service PID

Click **Apply**.

![1194](https://files.readme.io/3161f7d-tpm-create-cloud-connection.png "tpm-create-cloud-connection.png")

Select the new connection and go to the **TpmMqttDataTransport** tab.

![2652](https://files.readme.io/3c3371c-tpm_data_transport.png "tpm_data_transport.png")

Select the appropriate Device Model ID from the list of options. If a device model does not need to be specified your application, leave the default 'None' field'. Set the 'Device Model ID Version' to the appropriate version of the Device Model.

Connecting to Azure IoT Portal can be accomplished in two ways:

* Start at [Configure connection using IoT Hub DPS Individual Enrollment](#configure-connection-using-iot-hub-dps-individual-enrollment) for IoT Hub DPS Individual Enrollment
* Start at [Configure connection using IoT Central Individual Enrollment](#configure-connection-using-iot-central-individual-enrollment) for IoT Central Individual Enrollment

## Configure connection using IoT Hub DPS Individual Enrollment

The **Scope ID** and **Global Endpoint** can be found in the DPS in the Azure Portal by navigating to the **Overview** page of your Azure DPS.

Copy/paste the **ID Scope** and **Global device endpoint** to the **Scope ID** and **Global Endpoint** in ESF and click **Apply**.

![2717](https://files.readme.io/d2569c9-tpm-global-endpoint.png "tpm-global-endpoint.png")

Click the **Connect/Disconnect** button. The **Status** should change to Connected. The connection process may take up to 30 seconds.

When the AzureDpsTpm is connected, navigate to the device in DPS (via **Manage Enrollments**/**Individual Enrollments**). Select your device (the **Registration ID** will be the Registration ID you entered from the TPMInfoService above).

In the **Registration Status** section, confirm that the **Status** is "assigned." If the **Status** is still "unassigned" try refreshing the page in your browser (not the Azure Portal **Refresh** button).

![2728](https://files.readme.io/a1a904f-tpm-check-connection.png "tpm-check-connection.png")

When the gateway connects for the first time, a Device will be created in the IoT Hub. Navigate to your IoT Hub in the Azure Portal. Go to the **IoT Devices** page and confirm the device is listed. In the IoT Hub the gateway will be listed under the **Device ID** you entered earlier (not the TPM Registration ID).

![2715](https://files.readme.io/151b205-tpm-iot-hub-device.png "tpm-iot-hub-device.png")

The device is now connected.

## Configure connection using IoT Central Individual Enrollment

The Scope ID can be found in the Azure IoT Central Application. Navigate to the **Device Connection** section of the **Administration** page and copy the **ID Scope** to the **Scope ID** in ESF.

![3357](https://files.readme.io/0ec369c-tpm-id-scope.png "tpm-id-scope.png")

The **Global Endpoint** can be found in the DPS in the Azure Portal by navigating to the **Overview** page of your Azure DPS.

Copy/paste the **Global device endpoint** to the **Global Endpoint** in ESF and click **Apply**.

![3361](https://files.readme.io/1a4a90d-tpm-global-device-endpoint.png "tpm-global-device-endpoint.png")

Click the **Connect/Disconnect** button. The **Status** should change to Connected. The connection process may take up to 30 seconds.

When the AzureDpsTpm is connected, navigate to the **Devices** page in your IoT Central Application. Confirm the **Device status** is **Provisioned**.

![3356](https://files.readme.io/2f21d1c-tpm-device-provisioned.png "tpm-device-provisioned.png")

The device is now connected.