<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CodeSys OPC UA client Unable to Connect To OPC UA sever through Username and password</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/6e785f0e78/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/6e785f0e78/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/6e785f0e78/</id><updated>2026-05-07T08:27:51.189000Z</updated><subtitle>Recent posts to CodeSys OPC UA client Unable to Connect To OPC UA sever through Username and password</subtitle><entry><title>CodeSys OPC UA client Unable to Connect To OPC UA sever through Username and password</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/6e785f0e78/?limit=25#3ba9" rel="alternate"/><published>2026-05-07T08:27:51.189000Z</published><updated>2026-05-07T08:27:51.189000Z</updated><author><name>kiranbsiddaiah</name><uri>https://forge.codesys.com/u/kiranbsiddaiah/</uri></author><id>https://forge.codesys.com5ca419146b561a18396e627bf4b3def047d4bf5c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;And also we do not have any opc ua related license . Do we need to have a opc ua license to communicate with OPC UA server with username and password&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CodeSys OPC UA client Unable to Connect To OPC UA sever through Username and password</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/6e785f0e78/?limit=25#ffe3" rel="alternate"/><published>2026-05-07T03:08:24.323000Z</published><updated>2026-05-07T03:08:24.323000Z</updated><author><name>kiranbsiddaiah</name><uri>https://forge.codesys.com/u/kiranbsiddaiah/</uri></author><id>https://forge.codesys.com53324f1c510efa2fe8857e41c38b438661a06d10</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I'm using codesys v3.5 sp21 software. I have downloaded the sample opc ua client project from &lt;a href="https://content.helpme-codesys.com/en/CODESYS%20Examples/_ex_uacapi_example.html" rel="nofollow"&gt;https://content.helpme-codesys.com/en/CODESYS%20Examples/_ex_uacapi_example.html&lt;/a&gt; and i tested connecting to "prosys opc ua simulation server".&lt;/p&gt;
&lt;p&gt;Through Anonymous connection it is &lt;strong&gt;connecting&lt;/strong&gt; to server and can read data. &lt;/p&gt;
&lt;p&gt;Later tried to connect using &lt;strong&gt;username and password&lt;/strong&gt;. &lt;br/&gt;
First got a &lt;strong&gt;SECURITY_CHECKS_FAILED&lt;/strong&gt; error, trusted the client certificate in the server and this issue resolved.&lt;br/&gt;
Next got an &lt;strong&gt;INVALID_CERTIFICATE&lt;/strong&gt; error, trusted the server certificate in the client and this issue resolved.&lt;br/&gt;
After these two error it is not &lt;strong&gt;establishing&lt;/strong&gt; the connection and not giving any error messages.&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;UAAsyncProp: UA.AsyncProperty := (tnTaskName:='UAClientTask', usiTaskPrio:=20, udiTaskInterval:=10000);&lt;br/&gt;
    UAPolicy: UA.SecurityPolicy := (sPolicy:=UA.OpcUa_SecurityPolicy.OpcUa_SecurityPolicy_Aes128Sha256RsaOaep, eSecurity:=UA.SECURITY_MODE.SIGN_AND_ENCRYPT);&lt;br/&gt;
    //UAPolicy: UA.SecurityPolicy := (sPolicy:=UA.OpcUa_SecurityPolicy.OpcUa_SecurityPolicy_None, eSecurity:=UA.SECURITY_MODE.NONE);&lt;br/&gt;
UAAuth: UA.UserNameAuth := (sUserName:=UAVars.sUser, sPassword:=UAVars.sPass);&lt;br/&gt;
    UAClient: UA.Client := (&lt;br/&gt;
        itfAsyncProperty:= UAAsyncProp, &lt;br/&gt;
        //sClientName:= 'MyOPC UA client name', //default: ‘CODESYS OPC UA Client’&lt;br/&gt;
        sURL:= UAVars.sURL,&lt;br/&gt;
        sSession:= UAVars.sSession,&lt;br/&gt;
        itfPolicy:= UAPolicy,&lt;br/&gt;
        itfAuth:=UAAuth,&lt;br/&gt;
        udiTimeout:= 100000&lt;br/&gt;
        //,itfNamespaceArray:= UAVars.itfNamespaceArray //optional use&lt;br/&gt;
    );&lt;br/&gt;
    -----------------------------------------------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Please let me know if any additional information required.&lt;/p&gt;
&lt;p&gt;Thank you...&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>