PALATINELABSDocsENES

Pages

↑↓ to moveEnter to openEsc to close

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.

Jump to actions

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

InputEditor fieldType; default; requirementUse
sessionSession nameStringdefault DefaultLocal connection name, such as LabDirectory⁠.
userNameUser or MemberStringdefault emptyrequiredExisting object name, such as sample.analyst⁠. User actions need a user. Membership accepts any one object.
groupNameGroupStringdefault emptyrequiredExisting group name, such as SampleReviewers⁠.
propertiesProperties (empty for all)Listdefault emptyAttribute names, such as ["displayName","sAMAccountName"]⁠. 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.

Back to actions

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.

InputEditor fieldType; default; requirementUse
ldapPathLDAP pathStringdefault emptyrequiredLDAP:// or GC:// path, such as LDAP://directory.example.com/OU=AutomationSamples,DC=example,DC=com⁠. Not a bare distinguished name or an HTTP link.
credentialCredentialsCredentialdefault emptyEmpty user name: the process account. Else its user name and password sign in with secure authentication.

Outputs

OutputTypeMeaning
sessionNameStringThe session name. Save it in directorySession and use $directorySession$ 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.

Back to actions

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.

InputEditor fieldType; default; requirementUse
containerPathContainer LDAP pathStringdefault emptyrequiredFolder for the new user, such as LDAP://directory.example.com/OU=AutomationSamples,DC=example,DC=com⁠, where the account can create users. It can be outside the Connect path.
commonNameCommon nameStringdefault emptyrequired at runtimeNew common name, such as Sample Analyst⁠, trimmed. It is used in CN= as typed, so escape special characters yourself.
userNameLogon name (sAMAccountName)Stringdefault emptyrequiredNew unique account name, such as sample.analyst⁠, trimmed. Must follow directory naming rules.
passwordPasswordCredentialdefault emptyrequired at runtimeCredential with the nonempty new password. Its user name is ignored.
userPrincipalNameUser principal nameStringdefault emptySign-in name. Empty: not set. It does not change the account name.
displayNameDisplay nameStringdefault emptyDisplay name, such as Sample Analyst⁠. Empty: not set.
enabledEnable the accountBooleandefault truetrue enables the account after the password is set. false leaves it disabled.

Outputs

OutputTypeMeaning
resultStringDistinguished 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.

Back to actions

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.

Back to actions

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.

Back to actions

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.

Back to actions

Get group properties (activeDirectoryGetGroupProperties)

Read attributes of one group.

Inputs

Uses shared fields: session, groupName, properties.

Outputs

OutputTypeMeaning
resultDictionaryText 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 ;.

Back to actions

Get user properties (activeDirectoryGetUserProperties)

Read attributes of one user.

Inputs

Uses shared fields: session, userName, properties.

Outputs

OutputTypeMeaning
resultDictionaryText 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.

Back to actions

List children (activeDirectoryListChildren)

List the objects directly in one folder, as distinguished names. Subfolders are not searched.

Inputs

Uses shared fields: session.

InputEditor fieldType; default; requirementUse
containerPathContainer LDAP path (empty for the session root)Stringdefault emptyEmpty: the session root. Else an LDAP:// or GC:// path, such as LDAP://directory.example.com/OU=AutomationSamples,DC=example,DC=com⁠.
objectTypeObject typeAdObjectTypedefault anyuser⁠, group⁠, computer⁠, organizationalUnit or any (all types).

Outputs

OutputTypeMeaning
resultListDistinguished 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.

Back to actions

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.

Back to actions