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

  1. Create a bot.
    1. On the left panel, click Automation.
      A list of available bots and forms is displayed.
    2. Click Create New > Bot.
    3. Enter a name for the bot: Active_Directory_User Operation.
    4. Click Create and Edit.
  2. Use the Connect action to establish a connection with an Active Directory server.
    1. Double-click or drag the Active Directory > Connect action.
    2. Enter Default in the Session name field.
    3. 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
    4. 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
  3. Use the Create group action to create a new group.
    1. Double-click or drag the Active Directory > Create group action.
    2. Enter Default in the Session name field.
    3. Enter AA_India_Documentation in the Group name field.
    4. Select the group scope as Global.
    5. Select the group type as Distribution.

    Create group in active directory

  4. Use the Create user action to configure and activate a new user.
    1. Double-click or drag the Create user action.
    2. Enter Default in the Session name field.
    3. Enter Maverick John in the User name field.
    4. Enter maverick.john in the Logon name field.
    5. Enter Maverick in the First name field.
    6. Select the check box Active user to activate the user.
  5. Use the Add user to group action to add an existing user to a user-created group.
    1. Double-click or drag the Add user to group action.
    2. 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.
    3. Enter AA_India_Documentation in the Group name field.
    4. Enter Default in the Session name field.

    Create and add user to the group

  6. Use the Set user property action to assign a value to a user property, view the current details, and update it.
    1. Double-click or drag the Set user property action.
    2. Enter Default in the Session name field.
    3. Select the User name option and enter Maverick John.
    4. Enter displayName in the Property field.
    5. Enter Mark in the Value field.
  7. Use the Get user property action to retrieve a specific property value for a user and assigns the results to a variable.
    1. Double-click or drag the Get user property action.
    2. Enter Default in the Session name field.
    3. Select the User name option and enter Maverick John.
    4. Enter displayName in the Property field.
    5. Select SampleString variable to assign value.

    Get user property

  8. Use Message box action to print the values.
    1. Double-click or drag the Message box action.
    2. In the Enter the message to display field, select $SampleString$.
  9. Use the Rename user action to rename the user logon name or the user account name.
    1. Double-click or drag the Rename user action.
    2. Enter Default in the Session name field.
    3. Select the User name option and enter Maverick John.
    4. Enter Maverick John Ray in the New name field.
    5. Select the Rename user name option to update.
  10. Use Update user details action to update the details of a user.
    1. Double-click or drag the Update user details action.
    2. Enter Default in the Session name field.
    3. Select the User name option and enter Maverick John.
    4. Enter Maverick John Ray in the First name field.
  11. Use the Disable user account action to disable a user account.
    1. Double-click or drag the Disable user account action.
    2. Enter Default in the Session name field.
    3. Select the User name option and enter Maverick John Ray.
  12. Use the Delete user action to delete an existing user.
    1. Double-click or drag the Delete user action.
    2. Enter Default in the Session name field.
    3. Select the User name option and enter Maverick John Ray.
  13. Use the Disconnect action to close the connection with the LDAP server. In the Session name field, enter Default.
  14. Click Save and then Run.