Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Azure icon
Labs

Working with the Azure IoT Device Provisioning Service

The Device Provisioning Service allows you to deploy thousands of devices without human interaction. In this lab, we will work the the DPS and integrate it into our Azure IoT solution.

Azure icon
Lab platform
Lab Info
Level
Beginner
Last updated
Aug 26, 2025
Duration
45m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Create the Azure Device Provisioning Service
    1. Use Azure Cloud Shell to create the Device Provisioning Service.

    2. Choose the Bash environment.

    3. Select Show advanced settings.

    4. Use the existing storage account that resides in the resource group location and the existing cloudshell file share name.

    5. Once in the shell, enter the following to create the IoT hub:

      az iot dps create --name IoTDPS-XXXXX --resource-group <TAB> --location westus
      

      XXXXX is the five-character suffix for the lab resources and <TAB> is the Tab key. Press it there to automatically populate the resource group name.

  2. Challenge

    Create Shared Access Policies in the IoT Hubs

    While many tutorials state that the DPS can use the iothubowner shared access policy to link to an IoT Hub, best practice is to configure a new shared access policy with only the permissions required to link the Hub.

    In the Azure Portal, navigate to iothub-XXXXX (where XXXXX is the five-character suffix for the lab resources) and create a new shared access policy by clicking on Shared access policy, then + Add. Create the policy with the name dps and set the following permissions:

    • Registry read
    • Registry write
    • Service connect

    Repeat this procedure for iothub2-XXXXX.

  3. Challenge

    Link the IoT Hubs to the DPS

    In order to assign devices to IoT Hubs, they must be linked to the DPS.

    1. In the Azure Portal, navigate to the DPS created in the first objective.
    2. Click on Linked IoT hubs in the DPS pane.
    3. Click + Add and select iothub-XXXXX from the drop-down. Click Save.
    4. Repeat step 3 for iothub2-XXXXX.
  4. Challenge

    Configure the DPS Allocation Policy

    Our final requirement is to configure the DPS to assign devices to the IoT Hubs based on lowest latency.

    1. In the Azure Portal, navigate to the DPS created in the first objective.
    2. Click on Manage allocation policy in the DPS pane.
    3. Under Select how you want to assign devices to hubs, select Lowest latency, then click Save.
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight