Skip to content

Authenticate to IoT Hub using AAD in tests#7493

Open
damonbarry wants to merge 97 commits intoAzure:mainfrom
damonbarry:iothub-sss
Open

Authenticate to IoT Hub using AAD in tests#7493
damonbarry wants to merge 97 commits intoAzure:mainfrom
damonbarry:iothub-sss

Conversation

@damonbarry
Copy link
Copy Markdown
Member

@damonbarry damonbarry commented Dec 16, 2025

This change updates the IotEdgeQuickstart test app and tests modules used by the connectivity test pipeline to:

  • replace Microsoft.Azure.EventHubs (deprecated, doesn't support federated credentials) with Azure.Messaging.EventHubs to read messages from Event Hub
  • update to the latest Microsoft.Azure.Devices SDK (older version doesn't support federated credentials) to communicate with IoT Hub (working with device registry, twins, edge deployments)

In the IotEdgeQuickstart test app, which runs on the pipeline agent VM and has access to Azure CLI credentials, we pass Azure.Identity.AzureCliCredential to the SDKs to communicate with Event Hub and IoT Hub.

In the test modules, which run in Docker containers and do not have access to Azure CLI credentials on the pipeline agent VM, but can have credentials mounted as a file, we pass Azure.Identity.WorkloadIdentityCredential to the SDKs to communicate with Event Hub and IoT Hub. We use an OIDC API in DevOps to generate and refresh the mounted credential from the system access token passed into the pipeline.

This change also updates the pipeline YAML files and related scripts to support the updates to the test app.

Azure IoT Edge PR checklist:

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines and Best Practices

  • I have read the contribution guidelines.
  • Title of the pull request is clear and informative.
  • Description of the pull request includes a concise summary of the enhancement or bug fix.

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • Description of the pull request includes
    • concise summary of tests added/modified
    • local testing done.

damonbarry and others added 30 commits April 15, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant