LDAP

App · 10 actions

Find, create and update users and groups in a directory you run yourself, such as on-premises Active Directory, OpenLDAP or FreeIPA: onboard people with an account, password and groups, and offboard them by disabling and moving their account. For Microsoft Entra ID, Okta or JumpCloud's own users, use their integrations.

Actions

ActionWhat it does
Add to a groupMake a user (or a group) a member of a group.
Create an entryAdd a user, group, OU or any other entry to the directory.
Delete an entryDelete one entry, such as a leaver's account once it has been disabled for a while.
Enable or disable an accountTurn an account's sign-in off when someone leaves, or on once a new starter's account is ready.
Find entriesSearch the directory for users, groups or anything else, by attribute values or an LDAP filter, such as everyone in Sales or the account with a given email address.
Get an entryRead one entry by its DN, such as a user's email address, groups and manager.
Remove from a groupTake a user (or a group) out of a group.
Rename or move an entryGive an entry a new name, move it to another OU, or both, such as moving a leaver's account to a Leavers OU.
Set a passwordSet an account's password, such as a new starter's first one or a reset.
Update an entryChange an entry's attributes in one go, such as a user's title, department and manager.

Add to a group

Make a user (or a group) a member of a group. Someone already in it is left as they are, and the step carries on.

Inputs

GroupgrouptextRequired
The group's DN, such as CN=Sales,OU=Groups,DC=example,DC=com.
MembermembertextRequired
The DN of the user (or group) to add, such as CN=Ada Lovelace,OU=Staff,DC=example,DC=com. For a posixGroup, which lists user names, a user name such as alovelace works too.

Outputs

The membership.

addedtrue/false
True when the member was added; false when they were already in the group.
attributetext
Which attribute holds the group's members: member, uniqueMember or memberUid
grouptext
The group's DN
membertext
The member as written to the group: a DN, or a user name for a posixGroup
Example output
{
  "added": true,
  "attribute": "member",
  "group": "CN=Sales,OU=Groups,DC=example,DC=com",
  "member": "CN=Ada Lovelace,OU=Staff,DC=example,DC=com"
}

Create an entry

Add a user, group, OU or any other entry to the directory. In Active Directory a new user starts disabled with no password: follow with Set a password and Enable or disable an account.

Inputs

DNdntextRequired
The new entry's DN: its name, then where it goes, such as CN=Ada Lovelace,OU=Staff,DC=example,DC=com. The OU it goes in must exist.
Object classesobject_classeslistRequired
What kind of entry it is. For Active Directory: user, group or organizationalUnit. For OpenLDAP and FreeIPA people: inetOrgPerson; groups: groupOfNames.
Attributesattributesobject
The entry's attributes and their values, such as sAMAccountName: alovelace, userPrincipalName: alovelace@example.com, givenName: Ada and sn: Lovelace. A list gives several values. The name in the DN is filled in for you. Passwords go in Set a password.
If it already existsif_existstext
What to do when there is already an entry at that DN: stop the workflow, or carry on without changing it, which suits a workflow that may run twice for the same person.One of: fail (Stop the workflow), ignore (Carry on). Default: fail.

Outputs

The entry created.

createdtrue/false
True when it was created; false when one was already there and the step carried on.
dntext
The new entry's DN.
Example output
{
  "created": true,
  "dn": "CN=Ada Lovelace,OU=Staff,DC=example,DC=com"
}

Delete an entry

Delete one entry, such as a leaver's account once it has been disabled for a while. An entry with others under it, such as an OU that isn't empty, is never deleted.

Inputs

DNdntextRequired
The entry's DN (distinguished name): its full place in the directory, from itself up, such as CN=Ada Lovelace,OU=Staff,DC=example,DC=com. Find entries returns it as dn.
If there is no such entryif_missingtext
What to do when nothing is at that DN: stop the workflow, or carry on, which suits a cleanup step that may run more than once.One of: fail (Stop the workflow), ignore (Carry on). Default: fail.

Outputs

Whether the entry was deleted.

deletedtrue/false
True when it was deleted; false when there was nothing there and the step carried on.
dntext
The DN that was deleted.
Example output
{
  "deleted": true,
  "dn": "CN=Ada Lovelace,OU=Staff,DC=example,DC=com"
}

Enable or disable an account

Turn an account's sign-in off when someone leaves, or on once a new starter's account is ready. Works with Active Directory, FreeIPA and 389 Directory Server; nothing else about the account changes.

Inputs

DNdntextRequired
The account's DN, such as CN=Ada Lovelace,OU=Staff,DC=example,DC=com.
StatestatetextRequired
Whether the account can sign in afterwards.One of: disable (Disable the account), enable (Enable the account).

Outputs

The account's state now.

changedtrue/false
False when it was already in that state and nothing was changed.
dntext
The account's DN.
enabledtrue/false
Whether the account can sign in now.
Example output
{
  "changed": true,
  "dn": "CN=Ada Lovelace,OU=Staff,DC=example,DC=com",
  "enabled": false
}

Find entries

Search the directory for users, groups or anything else, by attribute values or an LDAP filter, such as everyone in Sales or the account with a given email address. Returns each entry with its DN and attributes, ready for a Repeat for each.

Inputs

Matchingmatchobject
Find entries whose attributes have these values, such as sAMAccountName: alovelace or mail: an address from an earlier step. Every pair must match. Values are taken literally, so * is just a character, and case usually doesn't matter.
Filtersearch_filtertext
An LDAP filter, for searches Matching can't express, such as (&(objectClass=user)(department=Sales)) or (sAMAccountName=a*). Sent as written, so a value from an earlier step should go in Matching instead. With both, an entry must match both.
Start atsearch_basetext
The DN to search from, such as OU=Staff,DC=example,DC=com. Leave empty to search from the connection's base DN.
Searchscopetext
How far below Start at to look.One of: subtree (That entry and everything under it), one (Only the entries directly under it), base (Only that entry itself). Default: subtree.
Attributesattributeslist
Which attributes to return, such as sAMAccountName, mail and memberOf. Leave empty for all of them. Add + for the directory's operational ones too (OpenLDAP keeps memberOf there).
Limitlimitnumber
The most entries to return, up to 1,000.From 1 to 1000. Default: 100.

Outputs

The entries found, in the order the directory gave them.

countnumber
How many entries were found.
entrieslist
Each entry found, with its dn and attributes.
filtertext
The filter that was sent, Matching included.
searched_fromtext
The DN the search started at.
truncatedtrue/false
True when there were more entries than Limit and only the first were returned.
Example output
{
  "count": 1,
  "entries": [
    {
      "attributes": {
        "displayName": "Ada Lovelace",
        "mail": "ada.lovelace@example.com",
        "memberOf": [
          "CN=Sales,OU=Groups,DC=example,DC=com",
          "CN=All Staff,OU=Groups,DC=example,DC=com"
        ],
        "objectGUID": "5b2a3f9c-8d41-4e0b-9a77-2c1d0e6f4b13",
        "objectSid": "S-1-5-21-3623811015-3361044348-30300820-1013",
        "sAMAccountName": "alovelace"
      },
      "dn": "CN=Ada Lovelace,OU=Staff,DC=example,DC=com"
    }
  ],
  "filter": "(sAMAccountName=alovelace)",
  "searched_from": "DC=example,DC=com",
  "truncated": false
}

Get an entry

Read one entry by its DN, such as a user's email address, groups and manager. Stops the workflow when there is no such entry; use Find entries to check whether one exists.

Inputs

DNdntextRequired
The entry's DN (distinguished name): its full place in the directory, from itself up, such as CN=Ada Lovelace,OU=Staff,DC=example,DC=com. Find entries returns it as dn.
Attributesattributeslist
Which attributes to return, such as sAMAccountName, mail and memberOf. Leave empty for all of them. Add + for the directory's operational ones too (OpenLDAP keeps memberOf there).

Outputs

The entry.

attributesobject
The entry's attributes by name. One value is text; several are a list, and attributes that hold lists (objectClass, member, memberOf, proxyAddresses) are always lists. objectGUID reads as a GUID, objectSid as S-1-5-..., other binary values as base64. An attribute asked for by name that the entry lacks is null (or an empty list).
dntext
The entry's DN.
Example output
{
  "attributes": {
    "displayName": "Ada Lovelace",
    "mail": "ada.lovelace@example.com",
    "memberOf": [
      "CN=Sales,OU=Groups,DC=example,DC=com",
      "CN=All Staff,OU=Groups,DC=example,DC=com"
    ],
    "objectGUID": "5b2a3f9c-8d41-4e0b-9a77-2c1d0e6f4b13",
    "objectSid": "S-1-5-21-3623811015-3361044348-30300820-1013",
    "sAMAccountName": "alovelace"
  },
  "dn": "CN=Ada Lovelace,OU=Staff,DC=example,DC=com"
}

Remove from a group

Take a user (or a group) out of a group. Someone who isn't in it is left as they are, and the step carries on.

Inputs

GroupgrouptextRequired
The group's DN, such as CN=Sales,OU=Groups,DC=example,DC=com.
MembermembertextRequired
The DN of the user (or group) to remove, such as CN=Ada Lovelace,OU=Staff,DC=example,DC=com. For a posixGroup, a user name such as alovelace works too.

Outputs

The membership that was ended.

attributetext
Which attribute holds the group's members: member, uniqueMember or memberUid
grouptext
The group's DN
membertext
The member as written to the group: a DN, or a user name for a posixGroup
removedtrue/false
True when the member was removed; false when they weren't in the group.
Example output
{
  "attribute": "member",
  "group": "CN=Sales,OU=Groups,DC=example,DC=com",
  "member": "CN=Ada Lovelace,OU=Staff,DC=example,DC=com",
  "removed": true
}

Rename or move an entry

Give an entry a new name, move it to another OU, or both, such as moving a leaver's account to a Leavers OU. In Active Directory this changes the CN only, not the user's sign-in name.

Inputs

DNdntextRequired
The entry's DN (distinguished name): its full place in the directory, from itself up, such as CN=Ada Lovelace,OU=Staff,DC=example,DC=com. Find entries returns it as dn.
New namenew_nametext
The entry's new name, such as Ada King, or with its attribute, such as CN=Ada King. Leave empty to keep it.
Move tonew_parenttext
The DN of the OU (or other entry) to move it under, such as OU=Leavers,DC=example,DC=com. Leave empty to keep it where it is.

Outputs

Where the entry is now.

dntext
The entry's DN now.
previous_dntext
Its DN before.
Example output
{
  "dn": "CN=Ada Lovelace,OU=Leavers,DC=example,DC=com",
  "previous_dn": "CN=Ada Lovelace,OU=Staff,DC=example,DC=com"
}

Set a password

Set an account's password, such as a new starter's first one or a reset. Works over an encrypted connection only. The new password must meet the directory's password policy.

Inputs

DNdntextRequired
The account's DN, such as CN=Ada Lovelace,OU=Staff,DC=example,DC=com.
New passwordpasswordtextRequired
The password to set. It isn't kept in the run's output.
Ask for a new password at next sign-inmust_change_at_next_sign_intrue/false
Make the person choose their own password when they next sign in, so only they know it. On unless you turn it off, as in Active Directory's own Reset Password box. Active Directory only: other directories set the password without asking. Off, a pending request to change it is cleared.Default: true.

Outputs

The account whose password was set (never the password).

dntext
The account's DN.
methodtext
How it was set: Active Directory's unicodePwd, or the standard password modify operation.
must_change_at_next_sign_intrue/false
Whether they'll be asked for a new password at their next sign-in.
Example output
{
  "dn": "CN=Ada Lovelace,OU=Staff,DC=example,DC=com",
  "method": "active_directory",
  "must_change_at_next_sign_in": true
}

Update an entry

Change an entry's attributes in one go, such as a user's title, department and manager. Values can also be added to or removed from a list, such as one of a user's proxyAddresses, and attributes cleared.

Inputs

DNdntextRequired
The entry's DN (distinguished name): its full place in the directory, from itself up, such as CN=Ada Lovelace,OU=Staff,DC=example,DC=com. Find entries returns it as dn.
Set thesechangesobject
Each attribute with its new value, replacing what is there, such as title: Engineer or manager: a manager's DN. A list gives several values; an empty value clears the attribute.
Add these valuesadd_valuesobject
Values to add, keeping those already there, such as proxyAddresses: smtp:ada@example.com. One already there is skipped.
Remove these valuesremove_valuesobject
Values to take away, keeping the rest. One that isn't there is skipped.
Clear theseclearlist
Attributes to empty completely, such as telephoneNumber.

Outputs

What was changed.

changedlist
The attributes that were changed.
dntext
The entry's DN.
skippedlist
Values left alone because they were already there (to add) or not there (to remove), each with its attribute, value and reason.
Example output
{
  "changed": [
    "proxyAddresses",
    "title"
  ],
  "dn": "CN=Ada Lovelace,OU=Staff,DC=example,DC=com",
  "skipped": []
}

On this page