Troubleshooting "Certificate validation failed. UntrustedRoot" Error in Azure IoT Operations with OPC UA Connector

MohdFhG 55 Reputation points
2025-03-13T13:10:05.2333333+00:00

Hi everyone,

I'm experiencing an issue when establishing a secure connection using the Azure IoT Operations connector for OPC UA to an OPC UA server. The error message I received after adding an asset is:

{
{"errors":[{"code":400,"message":{"title":"Disconnected","detail":"Session creation failure","lastTransitionTime":"2025-03-13T12:54:19.6823734Z","reasons":{"StatusCode":"BadNoCommunication","SimbolicId":"BadNoCommunication","Message":"Error establishing a connection: Error received from remote host: Certificate validation failed. UntrustedRoot: Eine Zertifikatkette wurde zwar verarbeitet, endete jedoch mit einem Stammzertifikat, das beim Vertrauensanbieter nicht als vertrauensw\u00FCrdig gilt.\r\n"}}}]}

Error establishing a connection: Error received from remote host: Certificate validation failed. UntrustedRoot: A certificate chain was processed, but ended with a root certificate that is not trusted by the trust provider.

I have configured the environment according to the Microsoft documentation, including the setup of a self-signed application instance certificate with cert-manager and the trusted certificates list in Kubernetes.

The OPC UA Server has security settings set to none and the authentication setting is anonymous.

I have added an asset endpoint using this command:

az iot ops asset endpoint create opcua --name -asset-endpoint -g  --instance  --target-address   --security-mode none --security-policy none

I can reach the OPC UA server using UaExpert.

I keep notice that the OPC UA server puts the connector of OPC UA certificates aio-opc-opcuabroker [...].der is in the rejected PKI folder.

Despite these checks, the error persists. Could anyone advise on potential causes for this error and suggest troubleshooting steps?

Thank you in advance

Azure IoT Operations
Azure IoT Operations
Azure IoT Operations is a set of modular services enabled by Azure Arc.
40 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 35,641 Reputation points MVP
    2025-03-14T17:57:12.09+00:00

    Hello MohdFhG,

    welcome to this moderated Azure community forum.

    This blog post explaining how to connect an actual device and custom OPC-UA server describes the steps to create a connect asset.

    Yes, managing the key is cumbersome and easy to do it wrong.

    That is why I introduce that dummy asset endpoint because it is not possible to add credentials via code and have it synchronized to the edge as a 'Kubernetes secret'.

    Keep an eye that the name of the secret (like opcuassetpassword) is only used within the Azure Keyvault. in the CLI commands the generic 'password' must be used. This can be seen in the properties of the dummy endpoint using the k9s tool.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.