Example using user account actions from Active Directory package
- Updated: 2023/05/04
Example using user account actions from Active Directory package
This example shows how to use actions to automate user account management tasks, such as: Create, Delete, Get property, Remove, Rename, and Set property.
Procedure
-
Create a bot.
-
On the left panel, click Automation.
A list of available bots and forms is displayed.
- Click Create New > Bot.
- Enter a name for the bot: Active_Directory_User Operation.
- Click Create and Edit.
-
On the left panel, click Automation.
-
Use the Connect
action to establish a connection with an Active
Directory server.
- Double-click or drag the Active Directory > Connect action.
- Enter Default in the Session name field.
-
Enter the LDAP URL in the Parent
path field:
LDAP://ec2-192.168.2.60.us-east-1.compute.amazonaws.com/CN=Users,DC=aaetest,DC=net
-
In the Login username
and Login password fields, enter your
user name and password. For example, select Insecure
string tab and enter the following values:
- Login username: ksmith.doe
- Login password: aa_testqwerty@123
-
Use the Create group
action to create a new group.
- Double-click or drag the Active Directory > Create group action.
- Enter Default in the Session name field.
- Enter AA_India_Documentation in the Group name field.
- Select the group scope as Global.
- Select the group type as Distribution.
-
Use the Create user
action to configure and activate a new user.
- Double-click or drag the Create user action.
- Enter Default in the Session name field.
- Enter Maverick John in the User name field.
- Enter maverick.john in the Logon name field.
- Enter Maverick in the First name field.
- Select the check box Active user to activate the user.
-
Use the Add user to group
action to add an existing user to a user-created
group.
- Double-click or drag the Add user to group action.
- Select the Add users from server option. To add an existing user from the server, enter these details : Host, Domain, Username, and Password in the Connect to server window and then click Connect.
- Enter AA_India_Documentation in the Group name field.
- Enter Default in the Session name field.
-
Use the Set user property
action to assign a value to a user property, view the
current details, and update it.
- Double-click or drag the Set user property action.
- Enter Default in the Session name field.
- Select the User name option and enter Maverick John.
- Enter displayName in the Property field.
- Enter Mark in the Value field.
-
Use the Get user property
action to retrieve a specific property value for a
user and assigns the results to a variable.
- Double-click or drag the Get user property action.
- Enter Default in the Session name field.
- Select the User name option and enter Maverick John.
- Enter displayName in the Property field.
- Select SampleString variable to assign value.
-
Use Message box
action to print the values.
- Double-click or drag the Message box action.
- In the Enter the message to display field, select $SampleString$.
-
Use the Rename user
action to rename the user logon name or the user
account name.
- Double-click or drag the Rename user action.
- Enter Default in the Session name field.
- Select the User name option and enter Maverick John.
- Enter Maverick John Ray in the New name field.
- Select the Rename user name option to update.
-
Use Update user details
action to update the details of a user.
- Double-click or drag the Update user details action.
- Enter Default in the Session name field.
- Select the User name option and enter Maverick John.
- Enter Maverick John Ray in the First name field.
-
Use the Disable user
account
action to disable a user account.
- Double-click or drag the Disable user account action.
- Enter Default in the Session name field.
- Select the User name option and enter Maverick John Ray.
-
Use the Delete user
action to delete an existing user.
- Double-click or drag the Delete user action.
- Enter Default in the Session name field.
- Select the User name option and enter Maverick John Ray.
- Use the Disconnect action to close the connection with the LDAP server. In the Session name field, enter Default.
- Click Save and then Run.