# Users | Sentry for Windows Forms

Users consist of a few critical pieces of information that construct a unique identity in Sentry. Each of these is optional, but one **must** be present for the Sentry SDK to capture the user:

### [`id`](https://docs.sentry.io/platforms/dotnet/guides/winforms/enriching-events/identify-user.md#id)

If you don't provide an `id`, the SDK falls back to `installationId`, which the SDK randomly generates once during an app's installation.

Your internal identifier for the user.

### [`username`](https://docs.sentry.io/platforms/dotnet/guides/winforms/enriching-events/identify-user.md#username)

The username. Typically used as a better label than the internal id.

### [`email`](https://docs.sentry.io/platforms/dotnet/guides/winforms/enriching-events/identify-user.md#email)

An alternative, or addition, to the username. Sentry is aware of email addresses and can display things such as Gravatars and unlock messaging capabilities.

### [`ip_address`](https://docs.sentry.io/platforms/dotnet/guides/winforms/enriching-events/identify-user.md#ip_address)

The user's IP address. If the user is unauthenticated, Sentry uses the IP address as a unique identifier for the user. The SDK will attempt to pull the IP address from the HTTP request data on incoming requests (`request.env.REMOTE_ADDR` field in JSON), if available. That requires `SendDefaultPii` set to `true` in the SDK options.

If the user's `ip_address` is set to `"{{auto}}"`, Sentry will infer the IP address from the connection between your app and Sentry's server. If the field is omitted, the default value is `null`.

To opt out of storing users' IP addresses in your event data, users with project admin permissions (Org Owner, Org Manager, Team Admin, or Org Admin) can go to your project settings, click on "Security & Privacy", and enable "Prevent Storing of IP Addresses". Alternatively, use Sentry's [server-side data](https://docs.sentry.io/security-legal-pii/scrubbing.md) scrubbing to remove `$user.ip_address`. Adding such a rule ultimately overrules any other logic.

Additionally, you can provide arbitrary key/value pairs beyond the reserved names, and the Sentry SDK will store those with the user.

To identify the user:

```csharp
SentrySdk.ConfigureScope(scope =>
{
    scope.User = new SentryUser
    {
        Email = "john.doe@example.com"
    };
});
```

You can also clear the currently set user:

```csharp
SentrySdk.ConfigureScope(scope =>
{
    scope.User = new SentryUser();
});
```
