Set up the IoT Hub Device Provisioning Service with the Azure portal

These steps show how to set up the Azure cloud resources in the portal for provisioning your devices. This article includes steps for: creating your IoT hub, creating a new IoT Hub Device Provisioning Service, and linking the two services together.

If you don't have an Azure subscription, create a free account before you begin.

Create an IoT hub

The first step is to use the Azure portal to create an IoT hub in your subscription. The IoT hub enables you to ingest high volumes of telemetry into the cloud from many devices. The hub then enables one or more back-end services running in the cloud to read and process that telemetry.

  1. Sign in to the Azure portal.

  2. Select Create a resource > Internet of Things > IoT Hub.

    Select to install IoT Hub

  3. In the IoT hub pane, enter the following information for your IoT hub:

    • Subscription: Choose the subscription that you want to use to create this IoT hub.
    • Resource group: Create a resource group to contain the IoT hub or use an existing one. By putting all related resources in a group together, such as TestResources, you can manage them all together. For example, deleting the resource group deletes all resources contained in that group. For more information, see Use resource groups to manage your Azure resources.
    • Region: Select the closest location to your devices.
    • Name: Create a unique name for your IoT hub. If the name you enter is available, a green check mark appears.

    Important

    The IoT hub will be publicly discoverable as a DNS endpoint, so make sure to avoid any sensitive information while naming it.

    IoT Hub basics window

  4. Select Next: Size and scale to continue creating your IoT hub.

  5. Choose your Pricing and scale tier. For this article, select the F1 - Free tier if it's still available on your subscription. For more information, see the Pricing and scale tier.

    IoT Hub size and scale window

  6. Select Review + create.

  7. Review your IoT hub information, then click Create. Your IoT hub might take a few minutes to create. You can monitor the progress in the Notifications pane.

Create a new instance for the IoT Hub Device Provisioning Service

  1. Click the Create a resource button found on the upper left-hand corner of the Azure portal.

  2. Search the Marketplace for the Device provisioning service. Select IoT Hub Device Provisioning Service and click the Create button.

  3. Provide the following information for your new Device Provisioning service instance and click Create.

    • Name: Provide a unique name for your new Device Provisioning service instance. If the name you enter is available, a green check mark appears.
    • Subscription: Choose the subscription that you want to use to create this Device Provisioning service instance.
    • Resource group: This field allows you to create a new resource group, or choose an existing one to contain the new instance. Choose the same resource group that contains the Iot hub you created above, for example, TestResources. By putting all related resources in a group together, you can manage them together. For example, deleting the resource group deletes all resources contained in that group. For more information, see Use resource groups to manage your Azure resources.
    • Location: Select the closest location to your devices.
    • Pin to dashboard: Select this option to have the instance pinned to your dashboard making it easier to find.

      Enter basic information about your Device Provisioning service instance in the portal blade

  4. Once the service is successfully deployed, its summary blade automatically opens.

In this section, you will add a configuration to the Device Provisioning service instance. This configuration sets the IoT hub for which devices will be provisioned.

  1. Click the All resources button from the left-hand menu of the Azure portal. Select the Device Provisioning service instance that you created in the preceding section.

  2. On the Device Provisioning Service summary blade, select Linked IoT hubs. Click the + Add button seen at the top.

  3. On the Add link to IoT hub page, provide the following information to link your new Device Provisioning service instance to an IoT hub. Then click Save.

    • Subscription: Select the subscription containing the IoT hub that you want to link with your new Device Provisioning service instance.
    • Iot hub: Select the IoT hub to link with your new Device Provisioning service instance.
    • Access Policy: Select iothubowner as the credentials for establishing the link with the IoT hub.

      Link the hub name to link to the Device Provisioning service instance in the portal blade

  4. Now you should see the selected hub under the Linked IoT hubs blade. You might need to click Refresh to show Linked IoT hubs.

Clean up resources

Other Quickstarts in this collection build upon this Quickstart. If you plan to continue on to work with subsequent Quickstarts or with the tutorials, do not clean up the resources created in this Quickstart. If you do not plan to continue, use the following steps to delete all resources created by this Quickstart in the Azure portal.

  1. From the left-hand menu in the Azure portal, click All resources and then select your Device Provisioning service. At the top of the All resources blade, click Delete.
  2. From the left-hand menu in the Azure portal, click All resources and then select your IoT hub. At the top of the All resources blade, click Delete.

Next steps

In this Quickstart, you’ve deployed an IoT hub and a Device Provisioning service instance, and linked the two resources. To learn how to use this set up to provision a simulated device, continue to the Quickstart for creating simulated device.