Using Azure Identity Service on Downstream Device in Transparent Gateway Scenario

Abby Greentree 171 Reputation points
2023-11-08T22:28:28.1566667+00:00

Overview: I am unable to use Azure Identity Service on a child device to connect to IoT Hub via a transparent gateway.

Details:

I am attempting to follow this tutorial: https://learn.microsoft.com/en-us/azure/iot-edge/how-to-create-transparent-gateway?view=iotedge-1.4&tabs=iotedge to connect a downstream device to Azure IoT Hub via an parent device acting as a transparent gateway.

I have this configuration working well when using azure iot sdk for python. I can confirm the child device can connect to the IoT Hub with the modified connection string.

I.e. This script connects successfully to the IoTHub via the gateway device 'abbyg-p16-eflow'image.png

Because the above script works - this leads me to believe that I do not have any issues with networking or firewall.

However when I try to establish a connection with Azure Identity Service I using this configuration file:

image.png

This passes the aziotctl connectivity check:image.png

But, I receive an unauthorized error when the identity service starts:image.png

I am not sure why I am receiving the Unauthorized error when using Azure Identity Service, but not when using the Azure IoT SDK for python. I am seeking to use Azure Identity Service for use with Azure Device Update. Any troubleshooting tips or solutions would be greatly appreciated, thank you.

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
557 questions
{count} votes

2 answers

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 13,951 Reputation points
    2023-11-16T00:30:47.9766667+00:00

    Hi @Abby Greentree Apologies for the delayed update on this. Can you inspect your configuration toml file and see if there is any section uncommented under DPS provisioning/reprovision. Based on the information, it looks like the device has been already provisioned without using DPS and now DPS is trying to provision it again. That could be the potential reasons why we the error could not find a valid back up for the device. Can you confirm if this is the case with your device?


    If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.


  2. Abby Greentree 171 Reputation points
    2024-06-18T00:07:15.9233333+00:00

    I discussed with the ADU team - the issue is that you need to be running the Microsoft Connected Cache module on the gateway device for the transparent gateway setup to work at all.

    0 comments No comments