> 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/ldap/createuser.md).

# CreateUser

Task version: 1.2.0

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.LDAP>

## Task Parameters

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

| Name                             | Description                                                                                                                                                                                               |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ObjectClass : `String`           | <p>ObjectClass.</p><p><br>Default: <code>-</code><br>Example: <code>User</code></p>                                                                                                                       |
| Path : `String`                  | <p>Directory path.</p><p><br>Default: <code>CN=Users,DC=Example,DC=Com</code><br>Example: <code>CN=Users,DC=Example,DC=Com</code></p>                                                                     |
| GivenName : `String`             | <p>Given name.</p><p><br>Default: <code>-</code><br>Example: <code>Firstname</code></p>                                                                                                                   |
| Surname : `String`               | <p>Surname (SN).</p><p><br>Default: <code>-</code><br>Example: <code>Lastname</code></p>                                                                                                                  |
| CommonName : `String`            | <p>Common name (CN).</p><p><br>Default: <code>-</code><br>Example: <code>Firstname Lastname</code></p>                                                                                                    |
| Email : `String`                 | <p>Email.</p><p><br>Default: <code>-</code><br>Example: <code><firstname.lastname@foo.bar></code></p>                                                                                                     |
| SetPassword : `Boolean`          | <p>Set password to new user.</p><p><br>Default: <code>-</code><br>Example: <code>true</code></p>                                                                                                          |
| SetPasswordInUnicode : `Boolean` | <p>Password can be added to the unicodePwd field as a byte\[] type</p><p>Requires connection.SecureSocketLayer or connection.TLS.</p><p><br>Default: <code>False</code><br>Example: <code>true</code></p> |
| 🗝Password : `String`            | <p>Password.</p><p><br>Default: <code>-</code><br>Example: <code>Password123</code></p>                                                                                                                   |
| Attributes : `Attributes[]`      | <p>Custom attribute values.</p><p><br>Default: <code>-</code><br>Example: <code>Telephone, +358123456789</code></p>                                                                                       |
| {% endtab %}                     |                                                                                                                                                                                                           |

{% tab title="Connection" %}

| Name                          | Description                                                                                                                                                                                                                          |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Host : `String`               | <p>LDAP server host.</p><p>This must resolve to a Domain Controller (FQDN) in the same domain</p><p>where the new object (user) will be created.</p><p><br>Default: <code>-</code><br>Example: <code>dc1.emea.company.com</code></p> |
| Port : `Int32`                | <p>Port. Value 0 = use LDAP/LDAPS default port which is 389 or 636 depending on (SecureSocketLayer) and (TLS).</p><p><br>Default: <code>0</code><br>Example: <code>389</code></p>                                                    |
| SecureSocketLayer : `Boolean` | <p>Perform secure operation.</p><p><br>Default: <code>-</code><br>Example: <code>true</code></p>                                                                                                                                     |
| TLS : `Boolean`               | <p>Connection is protected by TLS.</p><p><br>Default: <code>-</code><br>Example: <code>true</code></p>                                                                                                                               |
| User : `String`               | <p>User.</p><p><br>Default: <code>-</code><br>Example: <code>Foo</code></p>                                                                                                                                                          |
| 🗝Password : `String`         | <p>Password.</p><p><br>Default: <code>-</code><br>Example: <code>Bar123</code></p>                                                                                                                                                   |
| {% endtab %}                  |                                                                                                                                                                                                                                      |
| {% endtabs %}                 |                                                                                                                                                                                                                                      |

## Task Result

| Name                    | Description                                                              |
| ----------------------- | ------------------------------------------------------------------------ |
| Success : `Boolean`     | <p>User created.<br>Example: <code>true</code></p>                       |
| Error : `String`        | <p>LDAP Error message.<br>Example: <code>Entry Already Exists</code></p> |
| CommonName : `String`   | <p>Common name.<br>Example: <code>Firstname Lastname</code></p>          |
| PasswordSet : `Boolean` | <p>Password set.<br>Example: <code>true</code></p>                       |
| Path : `String`         | <p>Path.<br>Example: <code>CN=Users,DC=Example,DC=Com</code></p>         |

## Task Changelog

Changelog for Task Frends.LDAP.CreateUser.

### \[1.2.0] - 2026-02-03

#### Changed

* Improved documentation for Host parameter usage

### \[1.1.0] - 2025-09-26

#### Updated

* Added option to set the password for the new user in Unicode.

### \[1.0.0] - 2022-09-23

#### 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/ldap/createuser.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.
