# OpcPrincipal Class

> Reference: Represents a user of the server by its OpcIdentity, to which the entries of the access control lists and the access control roles apply.

<dl class="api-definition">
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.server">Opc.UaFx.Server</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Members</dt>
<dd><a href="./members">OpcPrincipal Members</a></dd>
</dl>

Represents a user of the server by its [OpcIdentity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcidentity/), to which the entries of the access control lists and the access control roles apply.

## Syntax

<div class="api-signature" data-lang="csharp">

```csharp
public class OpcPrincipal
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Class OpcPrincipal
```

</div>

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → **OpcPrincipal**

## Constructors

| Name | Description |
|---|---|
| [OpcPrincipal](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcprincipal/members#opcprincipal) | Initializes a new instance of the OpcPrincipal class using the `identity` specified. |

## Properties

| Name | Description |
|---|---|
| [Identity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcprincipal/members#identity) | Gets the identity of the principal. |

## Methods

| Name | Description |
|---|---|
| [IsInRole](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcprincipal/members#isinrole)<span class="api-meta">virtual · since v2.53</span> | Determines whether the current OpcPrincipal is a member of the specified `role`. |

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.5–v2.59 |
