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
This section describes how to create an IoT hub using the Azure portal.
Log in to the Azure portal.
Choose +Create a resource, then choose Internet of Things.
Click Iot Hub from the list on the right. You see the first screen for creating an IoT hub.
Fill in the fields.
Subscription: Select the subscription to use for your IoT hub.
Resource Group: You can create a new resource group or use an existing one. To create a new one, click Create new and fill in the name you want to use. To use an existing resource group, click Use existing and select the resource group from the dropdown list. For more information, see Manage Azure Resource Manager resource groups.
Region: This is the region in which you want your hub to be located. Select the location closest to you from the dropdown list.
IoT Hub Name: Put in the name for your IoT Hub. This name must be globally unique. If the name you enter is available, a green check mark appears.
The IoT hub will be publicly discoverable as a DNS endpoint, so make sure to avoid any sensitive information while naming it.
Click Next: Size and scale to continue creating your IoT hub.
On this screen, you can take the defaults and just click Review + create at the bottom.
Pricing and scale tier: You can choose from several tiers depending on how many features you want and how many messages you send through your solution per day. The free tier is intended for testing and evaluation. It allows 500 devices to be connected to the IoT hub and up to 8,000 messages per day. Each Azure subscription can create one IoT Hub in the free tier.
IoT Hub units: The number of messages allowed per unit per day depends on your hub's pricing tier. For example, if you want the IoT hub to support ingress of 700,000 messages, you choose two S1 tier units.
For details about the other tier options, see Choosing the right IoT Hub tier.
Advanced / Device-to-cloud partitions: This property relates the device-to-cloud messages to the number of simultaneous readers of the messages. Most IoT hubs only need four partitions.
Click Review + create to review your choices. You see something similar to this screen.
Click Create to create your new IoT hub. Creating the hub takes a few minutes.
Create a new instance for the IoT Hub Device Provisioning Service
Click the Create a resource button found on the upper left-hand corner of the Azure portal.
Search the Marketplace for the Device provisioning service. Select IoT Hub Device Provisioning Service and click the Create button.
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 Manage Azure Resource Manager resource groups.
Location: Select the closest location to your devices.
Click the notification button to monitor the creation of the resource instance. Once the service is successfully deployed, click Pin to dashboard, and then Go to resource.
Link the IoT hub and your Device Provisioning service
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.
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.
On the Device Provisioning Service summary blade, select Linked IoT hubs. Click the + Add button seen at the top.
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.
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.
- 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.
- 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.
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.
Send feedback about: