> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/tasks/tasks/opcua/read.md).

# Read

Task version: 1.0.0

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.Opcua/tree/main/Frends.Opcua.Read>

## Task Parameters

{% tabs %}
{% tab title="Input" %}

| Name                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Mode : `OpcOperationMode` | <p>Determines the mode for either reading specific nodes or browse existing nodes.</p><p>Possible values:</p><ul><li><code>Read</code>: Determines the mode for either reading specific nodes or browse existing nodes.</li><li><code>Browse</code>: Determines the mode for either reading specific nodes or browse existing nodes.</li></ul><p><br>Default: <code>0</code><br>Example: <code>OpcOperationMode.ReadNodes</code></p> |
| NodeIds : `String[]`      | <p>List of NodeIds to read from the OPC UA Server.</p><p><br>Default: <code>-</code><br>Example: <code>\[ "ns=2;i=1001", "ns=2;s=Temperature" ]</code></p>                                                                                                                                                                                                                                                                           |
| StartNodeId : `String`    | <p>NodeId of the node where browsing should be started.</p><p><br>Default: <code>-</code><br>Example: <code>ns=2;s=Temperature</code></p>                                                                                                                                                                                                                                                                                            |
| {% endtab %}              |                                                                                                                                                                                                                                                                                                                                                                                                                                      |

{% tab title="Connection" %}

| Name                                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ServerName : `String`                       | <p>OPC UA Server name or IP address.</p><p><br>Default: <code>localhost</code><br>Example: <code>localhost</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Port : `Int32`                              | <p>Port to be used to connect to the OPC UA Server.</p><p><br>Default: <code>4080</code><br>Example: <code>4080</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Path : `String`                             | <p>Optional parameter to set a specific path to the server URL.</p><p><br>Default: <code>-</code><br>Example: <code>path</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| AutoAcceptUntrustedCertificates : `Boolean` | <p>Whether to accept untrusted/self-signed server certificates.</p><p>Set to false in production environments.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Authentication : `AuthenticationMode`       | <p>Authentication to be used connecting to the OPC UA Server.</p><p>Possible values:</p><ul><li><code>Anonymous</code>: Authentication to be used connecting to the OPC UA Server.</li><li><code>UsernamePassword</code>: Authentication to be used connecting to the OPC UA Server.</li><li><code>Certificate</code>: Authentication to be used connecting to the OPC UA Server.</li></ul><p><br>Default: <code>1</code><br>Example: <code>AuthenticationMode.UsernamePassword</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Username : `String`                         | <p>Username for the authentication.</p><p><br>Default: <code>-</code><br>Example: <code>user</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 🗝Password : `String`                       | <p>Password for the authentication.</p><p><br>Default: <code>-</code><br>Example: <code>pass</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| CertificatePath : `String`                  | <p>Path to the certificate to be used to authenticate to OPC UA Server.</p><p><br>Default: <code>-</code><br>Example: <code>C:\path\to\certificate</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| 🗝CertificatePassword : `String`            | <p>Password for the certificate file.</p><p><br>Default: <code>-</code><br>Example: <code>Password</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| PrivateKeyPath : `String`                   | <p>Path to the private key. Used forr certificate authentication if .der or .crt typed certifications are being used.</p><p><br>Default: <code>-</code><br>Example: <code>C:\path\to\privatekey</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ConnectionTimeout : `Int32`                 | <p>Connection timeout in seconds.</p><p><br>Default: <code>10</code><br>Example: <code>10</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| SessionTimeout : `Int32`                    | <p>Session timeout in seconds.</p><p><br>Default: <code>60</code><br>Example: <code>60</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| SecurityMode : `OpcMessageSecurityMode`     | <p>Defines the OPC UA message security level applied to communication between client and server.</p><p>Controls whether messages are sent without security, digitally signed for integrity,</p><p>or both signed and encrypted for full confidentiality and protection against tampering.</p><p>Possible values:</p><ul><li><code>None</code>: Defines the OPC UA message security level applied to communication between client and server.</li></ul><p>Controls whether messages are sent without security, digitally signed for integrity,</p><p>or both signed and encrypted for full confidentiality and protection against tampering.</p><ul><li><code>Sign</code>: Defines the OPC UA message security level applied to communication between client and server.</li></ul><p>Controls whether messages are sent without security, digitally signed for integrity,</p><p>or both signed and encrypted for full confidentiality and protection against tampering.</p><ul><li><code>SignAndEncrypt</code>: Defines the OPC UA message security level applied to communication between client and server.</li></ul><p>Controls whether messages are sent without security, digitally signed for integrity,</p><p>or both signed and encrypted for full confidentiality and protection against tampering.</p><p><br>Default: <code>0</code><br>Example: <code>OpcMessageSecurityMode.None</code></p>                                                                                                                                                                                                                                                                                                                                               |
| ApplicationCertificatePath : `String`       | <p>Optional path to a PFX/PKCS#12 file to use as the client application certificate</p><p>for establishing a secure channel. When left empty a temporary self-signed certificate</p><p>is generated for the duration of the task and discarded afterwards.</p><p>Requires ApplicationCertificatePassword if the PFX is password protected.</p><p><br>Default: <code>-</code><br>Example: <code>C:\path\to\cert</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| 🗝ApplicationCertificatePassword : `String` | <p>Password for the PFX file specified in ApplicationCertificatePath.</p><p>Leave empty if the certificate has no password.</p><p><br>Default: <code>-</code><br>Example: <code>passphrase</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| SecurityPolicy : `OpcSecurityPolicy`        | <p>Defines the cryptographic algorithm set used for securing OPC UA communication.</p><p>Includes encryption algorithms, hashing functions, and key exchange mechanisms.</p><p>The selected policy must be supported by the server endpoint and compatible with the chosen SecurityMode.</p><p>Possible values:</p><ul><li><code>None</code>: Defines the cryptographic algorithm set used for securing OPC UA communication.</li></ul><p>Includes encryption algorithms, hashing functions, and key exchange mechanisms.</p><p>The selected policy must be supported by the server endpoint and compatible with the chosen SecurityMode.</p><ul><li><code>Basic256Sha256</code>: Defines the cryptographic algorithm set used for securing OPC UA communication.</li></ul><p>Includes encryption algorithms, hashing functions, and key exchange mechanisms.</p><p>The selected policy must be supported by the server endpoint and compatible with the chosen SecurityMode.</p><ul><li><code>Aes128Sha256RsaOaep</code>: Defines the cryptographic algorithm set used for securing OPC UA communication.</li></ul><p>Includes encryption algorithms, hashing functions, and key exchange mechanisms.</p><p>The selected policy must be supported by the server endpoint and compatible with the chosen SecurityMode.</p><ul><li><code>Aes256Sha256RsaPss</code>: Defines the cryptographic algorithm set used for securing OPC UA communication.</li></ul><p>Includes encryption algorithms, hashing functions, and key exchange mechanisms.</p><p>The selected policy must be supported by the server endpoint and compatible with the chosen SecurityMode.</p><p><br>Default: <code>0</code><br>Example: <code>OpcSecurityPolicy.None</code></p> |
| {% endtab %}                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

{% tab title="Options" %}

| Name                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ApplicationName : `String`       | <p>Application name used when connecting to the OPC UA Server.</p><p><br>Default: <code>Frends.OpcUa.Client</code><br>Example: <code>Frends.OpcUa.Client</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| PkiRootPath : `String`           | <p>The root directory path where the OPC UA client PKI store is located.</p><p>The SDK will create the following subdirectories automatically:</p><p>own — stores the auto-generated client application certificatetrusted — stores trusted server certificatesrejected — stores rejected server certificates</p><p>On first connect the SDK generates a self-signed application certificate and saves it</p><p>under {PkiRootPath}/own, which is then reused on subsequent runs.</p><p>Only applicable when OpcMessageSecurityMode is anything other than None.</p><p><br>Default: <code>-</code><br>Example: <code>./pki</code></p> |
| ThrowErrorOnFailure : `Boolean`  | <p>Whether to throw an error on failure.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ErrorMessageOnFailure : `String` | <p>Overrides the error message on failure.</p><p><br>Default: <code>-</code><br>Example: <code>Custom error message</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| {% endtab %}                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| {% endtabs %}                    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

## Task Result

| Name                  | Description                                                                                                                                          |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean`   | <p>Indicates whether the read operation was successful.<br>Example: <code>true</code></p>                                                            |
| NodeValues : `Object` | <p>JSON array of node read results. Each element contains NodeId, Value, DataType, StatusCode, and SourceTimestamp.<br>Example: <code>{ }</code></p> |
| Error : `Error`       | <p>Error message if the operation failed.<br>Example: <code>object { string Message, Exception AdditionalInfo }</code></p>                           |

## Task Changelog

Changelog for Task Frends.Opcua.Read.

### \[1.0.0] - 2026-05-18

#### Added

* Initial implementation


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.frends.com/tasks/tasks/opcua/read.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
