Skip to main content

Active Directory Component

Connect to an Active Directory server.

Component key: ldap

Description

Active Directory for LDAP (Lightweight Directory Access Protocol) is a protocol for accessing and managing directory information. This component provides tools for operations such as authentication, querying, and managing directory entries.

Library Reference

The component was built using the ldapts library.

Connections

LDAP Connection

To connect to an Active Directory server, you must provide the following details:

  • URL: The Active Directory server URL (e.g., ldap://ldap.example.com).
  • DN: The Distinguished Name (DN) used to bind to the server (e.g., uid=example,dc=example,dc=com).
  • Password: The password associated with the DN.
  • Certificate (optional): A certificate for secure connections if required by the server.

Ensure these details are correctly configured in the connection settings to establish a successful connection.

InputNotesExample
Certificate
text
certificate
Certificate to use for the connection if required by the LDAP server.
-----BEGIN CERTIFICATE----- MIIC0DCCAbigAwIBAgIJA...
DN
string
/ Required
dn
LDAP server Distinguished Name to bind to.
cn=John Doe,ou=Users,dc=example,dc=com
Password
password
/ Required
password
Password for the DN to bind to.
 
URL
string
/ Required
url
LDAP server URL.
ldap://ldap.example.com

Actions

Add Entry

Add entry in Active Directory. | key: addEntry

InputDefaultNotesExample
Attributes to Add
code
/ Required
attributesToAdd
The attributes to add to the entry. Must be a JSON object.
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
DN to Add
string
/ Required
dnToAdd
The DN of the entry to add.
OU=Users,DC=example,DC=com

{
"data": "Entry added at OU=Users,DC=example,DC=com."
}

Add Group

Add group in Active Directory. | key: addGroup

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
Group DN
string
/ Required
groupDn
The DN of the group to add.
cn=group,ou=groups,dc=example,dc=com
Group Name
string
/ Required
groupName
The name of the group to add.
New Group
Group Type
string
/ Required
groupType
The type of group to add.
-2147483646
sAMAccountName
string
/ Required
sAMAccountName
The sAMAccountName of the group to add.
newgroup

{
"data": "Group group has been added successfully."
}

Add User

Add a user in Active Directory. | key: addUser

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
Password
password
/ Required
password
The password of the user to add.
password
sAMAccountName
string
/ Required
sAMAccountName
The sAMAccountName of the user to add.
newuser
User DN
string
/ Required
userDn
The DN of the user to add.
cn=user,ou=users,dc=example,dc=com
User Name
string
/ Required
userName
The name of the user to add.
New User
User Principal Name
string
/ Required
userPrincipalName
The user principal name of the user to add.
user@example.com

{
"data": "User user has been created successfully."
}

Add User to Group

Add a user to a group in Active Directory. | key: addUserToGroup

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
Group DN
string
/ Required
groupDn
The DN of the group to add the user to.
cn=group,ou=groups,dc=example,dc=com
User DN to Add
string
/ Required
userDnToAdd
The DN of the user to add to the group.
cn=user,ou=users,dc=example,dc=com

{
"data": "User CN=user,OU=Users,DC=example,DC=com added to group CN=group,OU=Groups,DC=example,DC=com."
}

Bind

Bind test in Active Directory. | key: bind

InputDefaultNotes
Connection
connection
/ Required
connection
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.

{
"data": "Successfully bound to LDAP server."
}

Delete Entry

Delete an entry in Active Directory. | key: deleteEntry

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
DN to Delete
string
/ Required
dnToDelete
The DN of the entry to delete.
OU=Users,DC=example,DC=com

{
"data": "Successfully deleted entry at OU=Users,DC=example,DC=com."
}

Disable User Account

Disable a user in Active Directory. | key: disableUserAccount

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
User DN
string
/ Required
userDn
The DN of the user to disable.
cn=user,ou=users,dc=example,dc=com

{
"data": "User CN=user,OU=Users,DC=example,DC=com has been disabled."
}

Extended Operation

Perform an extended operation in Active Directory. | key: extendedOperation

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
OID
string
/ Required
oid
The OID of the extended operation to perform.
1.3.6.1.4.1.4203.1.11.3
Value
string
value
The value to send with the extended operation.
test

{
"data": {
"oid": "1.3.6.1.4.1.4203.1.11.3",
"value": ""
}
}

Is Authenticated

Check if the connection is authenticated. | key: isAuthenticated

InputDefaultNotes
Connection
connection
/ Required
connection
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.

{
"data": true
}

Move User to Organizational Unit

Move user to Organizational unit in Active Directory. | key: moveUserToOrganizationalUnit

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
New OU User DN
string
/ Required
newOuUserDn
The new DN for the user.
cn=user,ou=admins,dc=example,dc=com
OU User DN
string
/ Required
ouUserDn
The DN of the user to move.
cn=user,ou=users,dc=example,dc=com

{
"data": "Successfully moved user to CN=user,OU=Admins,DC=example,DC=com."
}

Remove User From Group

Remove a user from group in Active Directory. | key: removeUserFromGroup

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
Group DN
string
/ Required
groupDn
The DN of the group to remove the user from.
cn=group,ou=groups,dc=example,dc=com
User DN to Remove
string
/ Required
userDnToRemove
The DN of the user to remove from the group.
cn=user,ou=users,dc=example,dc=com

{
"data": "User CN=user,OU=Users,DC=example,DC=com removed from group CN=group,OU=Groups,DC=example,DC=com."
}

Search Entries

Search entries in Active Directory. | key: search

InputDefaultNotesExample
Attributes
string
Value List
attributes
The attributes to retrieve from the search operation. Leave empty to retrieve all attributes.
name
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
Filter
string
/ Required
filter
(objectClass=*)
The filter to apply to the search operation.
(objectClass=*)
Include References
boolean
includeReferences
false
Include references in the search results.
 
Scope
string
/ Required
scope
sub
The scope of the search operation.
sub
Search Base
string
/ Required
searchBase
The base DN to start the search operation from.
OU=Users,DC=example,DC=com

{
"data": {
"entries": [
{
"dn": "OU=Users,DC=example,DC=com",
"ou": "Users",
"name": "Users"
}
],
"references": []
}
}

Search Groups

Search groups in Active Directory. | key: searchGroups

InputDefaultNotesExample
Additional Attributes
string
Value List
additionalAttributes
Additional attributes to include in the search results.
sAMAccountName
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 

{
"data": {
"groups": [
{
"dn": "CN=Administrators,CN=Builtin,DC=example,DC=com",
"cn": "Administrators",
"name": "Administrators"
}
]
}
}

Search Users

Search users in Active Directory. | key: searchUsers

InputDefaultNotesExample
Additional Attributes
string
Value List
additionalAttributes
Additional attributes to include in the search results.
sAMAccountName
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 

{
"data": {
"users": [
{
"dn": "CN=user,OU=Users,DC=example,DC=com",
"cn": "user",
"mail": []
}
]
}
}

Set Password to User

Set user password in Active Directory. | key: setPasswordToUser

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
New Password
password
/ Required
newPassword
The new password for the user.
newpassword
User DN
string
/ Required
userDn
The DN of the user to set the password for.
cn=user,ou=users,dc=example,dc=com

{
"data": "Password set successfully for user CN=user,OU=Users,DC=example,DC=com."
}

Update Entry

Update entry in Active Directory. | key: updateEntry

InputDefaultNotesExample
Changes
code
/ Required
changes
The changes to apply to the entry. Must be an array of operations.
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
Entry to Update
string
/ Required
entryToUpdate
The DN of the entry to update.
cn=entry,ou=users,dc=example,dc=com

{
"data": "Successfully updated entry at CN=entry,OU=Users,DC=example,DC=com."
}

Update User

Update user in Active Directory. | key: updateUser

InputDefaultNotesExample
Changes
code
/ Required
changes
The changes to apply to the user. Must be an array of operations.
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
User to Update
string
/ Required
userToUpdate
The DN of the user to update.
cn=user,ou=users,dc=example,dc=com

{
"data": "Successfully updated user at CN=user,OU=Users,DC=example,DC=com."
}