Active Directory - Get Group Members

 

Declaration

<AMGETGROUPMEMBERS GROUP="LDAP://OU=TestCases,DC=networkautomation,DC=com" RESULTDATASET="datasetName" USERNAME="userName" PASSWORD="AM18cWtIJAA3Cw=aME" />

See Also

AD - Create Object | AD - Create User | AD - Delete Object | AD - Get Object Dataset | AD - Get Object Path | AD - Get Object Property | AD - List Object Path | AD - Modify Group | AD - Modify User | AD - Move Object | AD - Set Object Property | AD - Create Group

Description

Retrieves all members of a specific Active Directory Group and populates a dataset with the results.

IMPORTANT: In order to properly use AutoMate's Active Directory actions, you should have a basic understanding of Active Directory and related components (e.g. domain controllers, trust relationships, forests, OUs, LDAPs, etc.) Also, to ensure that these actions function appropriately, the target system must be part of a domain.

Practical Usage

Allows an administrator to retrieve and view all members of a particular Active Directory Group. Along with a Loop Dataset action, subsequent Active Directory actions can be performed to rename, modify or delete one or more members.

Parameters

General Properties

Property

Type

Req'd

Default

Markup

Description

Parent Path

Text

Yes

(Empty)

LDAPPATH=

"LDAP://DC=netauto,DC=com"

The LDAP (Lightweight Directory Access Protocol) path of the parent Active Directory container. This is usually the top most container or rootDSE path, the root of the directory data tree on a directory server.

Click the Select Container button to launch a standard Windows Active Directory dialog box that allows for the selection an Active Directory container.

Populate dataset with group members

Text

Yes

(Empty)

RESULTDATASET="myDataset"

The name of the dataset in which to populate the members of the chosen Active Directory group. More details regarding the fields that this dataset creates is entered below under Additional Notes.

Credentials Properties

Property

Type

Req'd

Default

Markup

Description

Username

Text

No

(Empty)

USERNAME="username"

Specifies the username of the Active Directory user.

NOTE: Leave the Username and Password fields blank in order to use the logon user's credentials. If only accessing Active Directory information, then any Domain user is valid. However, a Domain Administrator is required in order to modify an Active Directory user or group. We recommend using the credentials of a Domain Administrator for all AutoMate Active Directory actions.

Password

Text

No

(Empty)

PASSWORD="password"

Specifies the password of the Active Directory user.

NOTE: Leave the Username and Password fields blank in order to use the logon user's credentials. If only accessing Active Directory information, then any Domain user is valid. However, a Domain Administrator is required in order to modify an Active Directory user or group. We recommend using the credentials of a Domain Administrator for all AutoMate Active Directory actions.

Description Properties

The Description tab allows you to customize the text description of any step when it appears in the Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab is part of AutoMate's Error Handling functionality which allows you to select / omit specific errors that will cause a particular step to fail.

More about error causes properties

On Error Properties

The On Error tab is part of AutoMate's Error Handling functionality which allows you to determine what the task should do if a particular step encounters an error.

More about on error properties

Additional Notes

Datasets

A dataset is a multiple column, multiple row container object. This action creates and populates a dataset with the following fields (assuming the dataset name entered was theDataset):

Name

Type

Return Value

theDataset.MemberName

Text

Returns  the Active Directory group member's username.

theDataset.LDAPPath

Date

Returns the Active Directory group member's LDAP path.

 

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Get Members of Active Directory Group "LDAP://OU=TestCases,DC=mycompany,DC=com" and populate Automate Dataset "theGroupMembers".

<AMGETGROUPMEMBERS GROUP="LDAP://OU=TestCases,DC=mycompany,DC=com" RESULTDATASET="theGroupMembers" USERNAME="userName" PASSWORD="AM2PBnogx3fFdk=aME" />

↑ [Top of Page]