Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

CreateUser

Create a user to Active Directory.

Task version: 2.0.0

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Crossplatform

Task Parameters

Name
Description

ObjectClass : String

ObjectClass.

Default: - Example: User

Path : String

Directory path.

Default: CN=Users,DC=Example,DC=Com Example: CN=Users,DC=Example,DC=Com

GivenName : String

Given name.

Default: - Example: Firstname

Surname : String

Surname (SN).

Default: - Example: Lastname

CommonName : String

Common name (CN).

Default: - Example: Firstname Lastname

Email : String

Email.

Default: - Example: firstname.lastname@foo.bar

SetPassword : Boolean

Set password to new user.

Default: - Example: true

SetPasswordInUnicode : Boolean

Password can be added to the unicodePwd field as a byte[] type

Requires connection.SecureSocketLayer or connection.TLS.

Default: False Example: true

🗝Password : String

Password.

Default: - Example: Password123

Attributes : Attributes[]

Custom attribute values.

Default: - Example: Telephone, +358123456789

Name
Description

Host : String

LDAP server host.

This must resolve to a Domain Controller (FQDN) in the same domain

where the new object (user) will be created.

Default: - Example: dc1.emea.company.com

Port : Int32

Port. Value 0 = use LDAP/LDAPS default port which is 389 or 636 depending on (SecureSocketLayer) and (TLS).

Default: 0 Example: 389

SecureSocketLayer : Boolean

Perform secure operation.

Default: - Example: true

TLS : Boolean

Connection is protected by TLS.

Default: - Example: true

User : String

User.

Default: - Example: Foo

🗝Password : String

Password.

Default: - Example: Bar123

Name
Description

ThrowErrorOnFailure : Boolean

Whether to throw an error on LDAP failure. If false, the failure is returned in the Result.

Default: True Example: true

ErrorMessageOnFailure : String

Overrides the error message on failure.

Default: - Example: Creating the user failed

Task Result

Name
Description

Success : Boolean

User created. Example: true

CommonName : String

Common name. Example: Firstname Lastname

PasswordSet : Boolean

Password set. Example: true

Path : String

Path. Example: CN=Users,DC=Example,DC=Com

Error : Error

Error that occurred during task execution. Example: object { string Message, Exception AdditionalInfo }

Error.Message : String

Summary of the error. Example: Entry Already Exists

Error.AdditionalInfo : Exception

Additional information about the error. Example: object { Exception AdditionalInfo }

Task Changelog

Changelog for Task Frends.LDAP.CreateUser.

[2.0.0] - 2026-10-27

Changed

  • Added Options and CancellationToken parameters to the Task method.

  • Added ThrowErrorOnFailure and ErrorMessageOnFailure options. By default LDAP errors are now thrown instead of returned in the result.

  • [Breaking Change] The Error result property is now an object with Message and AdditionalInfo instead of a string. Validation and connection errors are now handled through the same error handling as LDAP errors.

  • Updated the target framework to .NET 8.

[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

Last updated

Was this helpful?