> ## Documentation Index
> Fetch the complete documentation index at: https://help.cryptolens.io/llms.txt
> Use this file to discover all available pages before exploring further.

# .NET: UserAuth

> Signatures, models and behavior for SKM.V3.Methods.UserAuth in the .NET SDK 4.0.54.

Methods that perform operations on a user object. A complete list can be found here: [UserAuth](/api-reference/generated/UserAuth)

**Namespace:** `SKM.V3.Methods`\
**Version:** 4.0.54. Both packages; all six documented target frameworks.

<CodeGroup>
  ```csharp C# theme={null}
  public class UserAuth
  ```

  ```vb VB.NET theme={null}
  Public Class UserAuth
  ```
</CodeGroup>

These methods return a result object. Check `Result == ResultType.Success` before using its data. In version 4.0.54, handled request and JSON errors normally return `ResultType.Error` with a diagnostic `Message`. A non-null result alone does not mean the request succeeded. See [Request Errors](/libraries/dotnet-reference/settings#request-errors).

## Constructors

<a id="ctor-500a512ca3" />

### UserAuth()

Creates an empty UserAuth object. This constructor does not send an API request.

<CodeGroup>
  ```csharp C# theme={null}
  public UserAuth()
  ```

  ```vb VB.NET theme={null}
  Public Sub New()
  ```
</CodeGroup>

## Methods

<a id="associate-9222b518e2" />

### Associate(string, AssociateUserModel)

Associates a user with a customer object.

<CodeGroup>
  ```csharp C# theme={null}
  public static BasicResult Associate(string token, AssociateUserModel parameters)
  ```

  ```vb VB.NET theme={null}
  Public Shared Function Associate(token As String, parameters As AssociateUserModel) As BasicResult
  ```
</CodeGroup>

[Web API Reference](/api-reference/generated/Associate)

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | This method can be called with an access token that has UserAuthAdmin permission. More info: [Auth](/api-reference/generated/Auth) |
| `parameters` | [`AssociateUserModel`](/libraries/dotnet-reference/models/associate-user-model) | Parameters of the method. |

**Returns:** [`BasicResult`](/libraries/dotnet-reference/models/basic-result). The API response. Check `Result` and `Message` before using the returned data.

<a id="change-password-6c921b7275" />

### ChangePassword(string, ChangePasswordModel)

This method will change the password of a user. It supports 3 modes of operation. With an access token that has UserAuthNormal permission (i.e. without admin permission), the password can either be changed by providing the old password or a password reset token, which can be generated using Reset Password Token method. Finally, if you call this method with an access token that has UserAuthAdmin permission, it will allow you to set AdminMode to True and only provide the NewPassword.

<CodeGroup>
  ```csharp C# theme={null}
  public static BasicResult ChangePassword(string token, ChangePasswordModel parameters)
  ```

  ```vb VB.NET theme={null}
  Public Shared Function ChangePassword(token As String, parameters As ChangePasswordModel) As BasicResult
  ```
</CodeGroup>

[Web API Reference](/api-reference/generated/ChangePassword)

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | This method can be called with an access token that has UserAuthNormal or UserAuthAdmin permission. More info: [Auth](/api-reference/generated/Auth) |
| `parameters` | [`ChangePasswordModel`](/libraries/dotnet-reference/models/change-password-model) | Parameters of the method. |

**Returns:** [`BasicResult`](/libraries/dotnet-reference/models/basic-result). The API response. Check `Result` and `Message` before using the returned data.

<a id="dissociate-1a97de0f72" />

### Dissociate(string, DissociateModel)

Dissociates a user from a customer customer object.

<CodeGroup>
  ```csharp C# theme={null}
  public static BasicResult Dissociate(string token, DissociateModel parameters)
  ```

  ```vb VB.NET theme={null}
  Public Shared Function Dissociate(token As String, parameters As DissociateModel) As BasicResult
  ```
</CodeGroup>

[Web API Reference](/api-reference/generated/Dissociate)

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | This method can be called with an access token that has UserAuthAdmin permission. More info: [Auth](/api-reference/generated/Auth) |
| `parameters` | [`DissociateModel`](/libraries/dotnet-reference/models/dissociate-model) | Parameters of the method. |

**Returns:** [`BasicResult`](/libraries/dotnet-reference/models/basic-result). The API response. Check `Result` and `Message` before using the returned data.

<a id="get-users-bd6c0cc214" />

### GetUsers(string, GetUsersModel)

List all registered users.

<CodeGroup>
  ```csharp C# theme={null}
  public static GetUsersResult GetUsers(string token, GetUsersModel parameters)
  ```

  ```vb VB.NET theme={null}
  Public Shared Function GetUsers(token As String, parameters As GetUsersModel) As GetUsersResult
  ```
</CodeGroup>

[Web API Reference](/api-reference/generated/GetUsers)

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | This method can be called with an access token that has UserAuthAdmin permission. More info: [Auth](/api-reference/generated/Auth) |
| `parameters` | [`GetUsersModel`](/libraries/dotnet-reference/models/get-users-model) | Parameters of the method. |

**Returns:** [`GetUsersResult`](/libraries/dotnet-reference/models/get-users-result). The API response. Check `Result` and `Message` before using the returned data.

<a id="login-1857f05b94" />

### Login(string, LoginUserModel)

This method will return all licenses that belong to the user.

<CodeGroup>
  ```csharp C# theme={null}
  public static LoginUserResult Login(string token, LoginUserModel parameters)
  ```

  ```vb VB.NET theme={null}
  Public Shared Function Login(token As String, parameters As LoginUserModel) As LoginUserResult
  ```
</CodeGroup>

[Web API Reference](/api-reference/generated/Login)

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | This method can be called with an access token that has UserAuthNormal and UserAuthAdmin permission. More info: [Auth](/api-reference/generated/Auth) |
| `parameters` | [`LoginUserModel`](/libraries/dotnet-reference/models/login-user-model) | Parameters of the method. |

**Returns:** [`LoginUserResult`](/libraries/dotnet-reference/models/login-user-result). The API response. Check `Result` and `Message` before using the returned data.

<a id="register-91e5fec248" />

### Register(string, RegisterUserModel)

This method will register a new user.

<CodeGroup>
  ```csharp C# theme={null}
  public static BasicResult Register(string token, RegisterUserModel parameters)
  ```

  ```vb VB.NET theme={null}
  Public Shared Function Register(token As String, parameters As RegisterUserModel) As BasicResult
  ```
</CodeGroup>

[Web API Reference](/api-reference/generated/Register)

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | This method can be called with an access token that has UserAuthAdmin permission. More info: [Auth](/api-reference/generated/Auth) |
| `parameters` | [`RegisterUserModel`](/libraries/dotnet-reference/models/register-user-model) | Parameters of the method. |

**Returns:** [`BasicResult`](/libraries/dotnet-reference/models/basic-result). The API response. Check `Result` and `Message` before using the returned data.

<a id="remove-user-e638a033fd" />

### RemoveUser(string, RemoveUserModel)

This method removes a user.

<CodeGroup>
  ```csharp C# theme={null}
  public static BasicResult RemoveUser(string token, RemoveUserModel parameters)
  ```

  ```vb VB.NET theme={null}
  Public Shared Function RemoveUser(token As String, parameters As RemoveUserModel) As BasicResult
  ```
</CodeGroup>

[Web API Reference](/api-reference/generated/RemoveUser)

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | This method can be called with an access token that has UserAuthAdmin permission. More info: [Auth](/api-reference/generated/Auth) |
| `parameters` | [`RemoveUserModel`](/libraries/dotnet-reference/models/remove-user-model) | Parameters of the method. |

**Returns:** [`BasicResult`](/libraries/dotnet-reference/models/basic-result). The API response. Check `Result` and `Message` before using the returned data.

<a id="reset-password-token-d94b3e6960" />

### ResetPasswordToken(string, ResetPasswordModel)

This method allows you to retrive the password reset token that you can use when calling Change Password method.

<CodeGroup>
  ```csharp C# theme={null}
  public static ResetPasswordResult ResetPasswordToken(string token, ResetPasswordModel parameters)
  ```

  ```vb VB.NET theme={null}
  Public Shared Function ResetPasswordToken(token As String, parameters As ResetPasswordModel) As ResetPasswordResult
  ```
</CodeGroup>

[Web API Reference](/api-reference/generated/ResetPasswordToken)

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | This method can be called with an access token that has UserAuthAdmin permission. More info: [Auth](/api-reference/generated/Auth) |
| `parameters` | [`ResetPasswordModel`](/libraries/dotnet-reference/models/reset-password-model) | Parameters of the method. |

**Returns:** [`ResetPasswordResult`](/libraries/dotnet-reference/models/reset-password-result). The API response. Check `Result` and `Message` before using the returned data.

[.NET SDK Reference](/libraries/dotnet-api) · [Reviewed Source Revision](https://github.com/Cryptolens/cryptolens-dotnet/tree/30aaf399ba53d9a111bee896c35bf557fa219394)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.