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
Source code: https://github.com/FrendsPlatform/Frends.LDAP
Task Parameters
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
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
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
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
OptionsandCancellationTokenparameters to the Task method.Added
ThrowErrorOnFailureandErrorMessageOnFailureoptions. By default LDAP errors are now thrown instead of returned in the result.[Breaking Change] The
Errorresult property is now an object withMessageandAdditionalInfoinstead 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?

