Active Directory package guide
Connect to an Active Directory test directory, inspect attributes, and manage users and group membership.
Version 2.17.1. Installed versions can differ. Examples are illustrative and not tested.
Prerequisites
Use Windows with this package and network access to the directory. To read, the account needs read permission. To change users and groups, it needs permission for those changes. Connect accepts LDAP:// or GC:// paths. Use LDAP:// to make changes: a correct path does not prove that the directory accepts writes.
The examples use the test folder LDAP://directory.example.com/OU=AutomationSamples,DC=example,DC=com, the test group SampleReviewers and the session LabDirectory. Leave Credentials empty to connect as the Windows account of the process, or use a prepared Credential. Never put a password in a text field.
Find a user or group by account name (sAMAccountName), common name or distinguished name, under the session root. If no object or more than one object matches, the step fails, so use the distinguished name when names repeat. A missing session, a refused change or a directory error also fails the step. Use the same session name in every step, and disconnect at the end and before you reuse the name. Fields not marked required are optional.
Shared fields
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
session | Session name | Stringdefault Default | Local connection name, such as Lab. |
user | User or Member | Stringdefault emptyrequired | Existing object name, such as sample.analyst. User actions need a user. Membership accepts any one object. |
group | Group | Stringdefault emptyrequired | Existing group name, such as Sample. |
properties | Properties (empty for all) | Listdefault empty | Attribute names, such as ["display. Empty reads all available attributes. |
An attribute with no value is left out. Several values are joined with ;. Dates come back as text such as 2026-10-15T09:00:00.0000000Z, and binary values as lowercase hex.
Actions
Add member to group (activeDirectoryAddToGroup)
Add one existing object to a group.
Inputs
Uses shared fields: session, userName, groupName.
Outputs
No outputs.
Example
With LabDirectory open and sample.analyst not yet a direct member of SampleReviewers, set session=LabDirectory, userName=sample.analyst and groupName=SampleReviewers.
Expected result
sample.analyst is now a member of SampleReviewers. Adding a member who is already there can fail.
Connect (activeDirectoryConnect)
Open a directory connection and save it under a session name. Connect reads the directory at once, so a wrong path or credential fails here.
Inputs
Uses shared fields: session.
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
ldap | LDAP path | Stringdefault emptyrequired | LDAP:// or GC:// path, such as LDAP://. Not a bare distinguished name or an HTTP link. |
credential | Credentials | Credentialdefault empty | Empty user name: the process account. Else its user name and password sign in with secure authentication. |
Outputs
| Output | Type | Meaning |
|---|---|---|
session | String | The session name. Save it in directory and use $directory later. |
Example
Set session=LabDirectory and ldapPath=LDAP://directory.example.com/OU=AutomationSamples,DC=example,DC=com. Leave Credentials empty, or use a prepared Credential variable directoryCredential. sessionName → directorySession.
Expected result
directorySession is LabDirectory. No directory object changes. A missing LDAP:// or GC:// prefix, refused access, an unreachable directory or a failed sign-in fails the step.
Create user (activeDirectoryCreateUser)
Create a user, set its password, then enable or disable it. These are three separate writes, not one.
Inputs
Uses shared fields: session.
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
container | Container LDAP path | Stringdefault emptyrequired | Folder for the new user, such as LDAP://, where the account can create users. It can be outside the Connect path. |
common | Common name | Stringdefault emptyrequired at runtime | New common name, such as Sample Analyst, trimmed. It is used in CN= as typed, so escape special characters yourself. |
user | Logon name (s | Stringdefault emptyrequired | New unique account name, such as sample.analyst, trimmed. Must follow directory naming rules. |
password | Password | Credentialdefault emptyrequired at runtime | Credential with the nonempty new password. Its user name is ignored. |
user | User principal name | Stringdefault empty | Sign-in name. Empty: not set. It does not change the account name. |
display | Display name | Stringdefault empty | Display name, such as Sample Analyst. Empty: not set. |
enabled | Enable the account | Booleandefault true | true enables the account after the password is set. false leaves it disabled. |
Outputs
| Output | Type | Meaning |
|---|---|---|
result | String | Distinguished name of the new user, or its LDAP:// path when the directory gives no distinguished name. |
Example
Prepare newAccountCredential in secure credential storage. With LabDirectory open, set session=LabDirectory, containerPath=LDAP://directory.example.com/OU=AutomationSamples,DC=example,DC=com, commonName=Sample Analyst, userName=sample.analyst, password=$newAccountCredential$, displayName=Sample Analyst and enabled=false. Leave userPrincipalName empty. result → createdDn.
Expected result
The new account is disabled and has the password and display name. createdDn is usually CN=Sample Analyst,OU=AutomationSamples,DC=example,DC=com. A name that exists or a password the policy refuses fails the step. If the password or the enabled state fails, the new user can stay in the directory: check it before you try again.
Disable user (activeDirectoryDisableUser)
Turn on the disabled flag of a user. Other account settings do not change.
Inputs
Uses shared fields: session, userName.
Outputs
No outputs.
Example
With LabDirectory open and sample.analyst enabled, set session=LabDirectory and userName=sample.analyst.
Expected result
sample.analyst is disabled. Safe to repeat.
Disconnect (activeDirectoryDisconnect)
Close the connection and remove the session, after the last step or in cleanup.
Inputs
Uses shared fields: session.
Outputs
No outputs.
Example
At the end of the flow, set session=LabDirectory.
Expected result
LabDirectory is closed, so later actions need Connect again. A session that is not open fails the step. Changes already saved stay.
Enable user (activeDirectoryEnableUser)
Turn off the disabled flag of a user. Other account settings do not change.
Inputs
Uses shared fields: session, userName.
Outputs
No outputs.
Example
With LabDirectory open and sample.analyst disabled, set session=LabDirectory and userName=sample.analyst.
Expected result
sample.analyst is enabled. Safe to repeat. Enabling does not reset the password, unlock the account or add group membership.
Get group properties (activeDirectoryGetGroupProperties)
Read attributes of one group.
Inputs
Uses shared fields: session, groupName, properties.
Outputs
| Output | Type | Meaning |
|---|---|---|
result | Dictionary | Text values by attribute name. See shared fields for the format. |
Example
With LabDirectory open, set session=LabDirectory, groupName=SampleReviewers and properties=["cn","member"]. result → Dictionary variable attributes.
Expected result
attributes.cn is SampleReviewers. If the group has direct members, attributes.member has their distinguished names, joined by ;.
Get user properties (activeDirectoryGetUserProperties)
Read attributes of one user.
Inputs
Uses shared fields: session, userName, properties.
Outputs
| Output | Type | Meaning |
|---|---|---|
result | Dictionary | Text values by attribute name. See shared fields for the format. |
Example
With LabDirectory open, set session=LabDirectory, userName=sample.analyst and properties=["displayName","sAMAccountName"]. result → Dictionary variable attributes.
Expected result
For the new account, attributes.displayName is Sample Analyst and attributes.sAMAccountName is sample.analyst.
List children (activeDirectoryListChildren)
List the objects directly in one folder, as distinguished names. Subfolders are not searched.
Inputs
Uses shared fields: session.
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
container | Container LDAP path (empty for the session root) | Stringdefault empty | Empty: the session root. Else an LDAP:// or GC:// path, such as LDAP://. |
object | Object type | Addefault any | user, group, computer, organizational or any (all types). |
Outputs
| Output | Type | Meaning |
|---|---|---|
result | List | Distinguished names, or the directory path of an object that has no distinguished name. Positions start at 0. |
Example
With LabDirectory open at the test folder and the test user created, set session=LabDirectory, leave containerPath empty and set objectType=user. result → List variable children.
Expected result
The list includes CN=Sample Analyst,OU=AutomationSamples,DC=example,DC=com. The order comes from the directory and is not sorted. No match gives an empty List. A wrong folder path fails the step.
Remove member from group (activeDirectoryRemoveFromGroup)
Remove one object from the direct members of a group. This changes group access and deletes neither object.
Inputs
Uses shared fields: session, userName, groupName.
Outputs
No outputs.
Example
With LabDirectory open and sample.analyst a direct member of SampleReviewers, set session=LabDirectory, userName=sample.analyst and groupName=SampleReviewers.
Expected result
sample.analyst is no longer a member of SampleReviewers. Removing a member who is not there can fail.