Active Directory
LAST UPDATED: OCT 16, 2024
Overview
Active Directory is a directory service from Microsoft that allows network administrators to manage users, domains, and objects within a network. D3's integration with Active Directory can perform operations such as disabling/enabling user accounts, resetting passwords, retrieving user and computer information, listing users, and more.
D3 SOAR is providing REST operations to function with Active Directory.
Active Directory is available for use in:
D3 SOAR | V12.7.83.0+ |
Category | Identity Access Management |
Deployment Options |
Known Limitations
A few known limitations of Active Directory are listed below.
A domain controller can create slightly less than 2.15 billion objects during its lifetime.
Users, groups, and computer accounts (security principals) can be members of a maximum of approximately 1,015 groups.
A limit of 999 Group Policy Objects (GPOs) can be applied to a user account or a computer account.
Avoid performing more than 5,000 operations per LDAP transaction when writing scripts or applications or an LDAP transaction.
Active Directory does not support Microsoft Entra ID Protection.
Please refer to https://jumpcloud.com/blog/active-directory-faq for more information.
Connection
To connect to Active Directory from D3 SOAR, please follow this part to collect the required information below:
Parameter | Description | Example |
Server Address | The server URL with a port number. If you need to use LDAPS, the port number is 636. Add the port number for LDAPS after the server address, separated by a colon (:). | ***.***.***.***:636 |
Domain Name (FQDN) | The domain name for Active Directory. | d3cyber7.local |
Username | The username of the Active Directory user to connect to. | Administrator |
Password | The password of the Active Directory user to connect to. | Yourpassword |
Permission Requirements
Commands | Required Permissions |
Disable AD User Account | Account Operators |
Enable AD User Account | Account Operators |
Find Users | Domain Users |
Get Users by Username | Domain Users |
Get Computer | Domain Users |
Get User logon/logoff Information from AD | Event Log Readers |
Get User By Group | Domain Users |
Reset User Password | *Change password and Rest password permissions for the desired user |
Test Connection | Domain Users |
* Upon creating a user, the default assigned role is Domain Users, which grants the least amount of permissions. Additional permissions may be required to run certain commands. For instructions on granting permissions, please refer to steps 1 to 4 of Modifying a User (Granting Permissions and Modifying Account Options).
* To run the Reset Password command for a desired user, permissions must be granted to that user. Follow the steps below:
Right-click on the desired user (in this example, User 2) and select Properties.
Select the Security tab. If the Security tab is not visible, go to View and ensure Advanced Features is checked. The Security tab will be then displayed.
Under Group or user names section, locate the user that is being used for the connection (DOCuser in this example). Under Permissions for [Username] (DOCuser in this case), allow the Change password and Reset password permissions. Click Apply.
Once this setting has been configured, the connection with the configured user or group (DOCuser in this example) can be used to reset the password for the desired user (User2 in this case).
Configuring Active Directory to Work with D3 SOAR
Creating a User
Access Azure Directory Users and Computers. Locate the Users folder under your domain in the left navigation panel and right-click on it. Select New > User.
The New Object - User window will appear. Fill in the user's basic information including First Name, Last Name, User logon name etc. Click Next. Note: The User logon name is the username you will need to input into D3 SOAR when configuring the integration connection.
Enter a new password for the user twice for confirmation. You can also choose to set the password attributes for the user. Click Next.
Review the configured user settings. Take note of the user logon name, excluding the domain name (e.g. @domain.name) as this will be required for the Username field when establishing the integration connection in D3 SOAR.
Modifying a User (Granting Permissions and Modifying Account Options)
Access Azure Directory Users and Computers and navigate to the Users folder under your domain in the left navigation panel. Right-click on the user you want to modify and select Properties.
The corresponding user's properties window will appear. Select the Member Of tab.
In the Member Of tab, click Add. The Select Group window will appear. In the Enter the object names to select field, enter your desired permissions, and select Check Names. Please refer to Permission Requirements for more details. Then click OK.
Click Apply to apply the changes.
If you want to modify the user's account settings, select the Account tab. Configure the settings as desired, then click Apply and OK.
Identifying the Domain Name
The domain name required to establish the integration in D3 SOAR can be found in Active Directory Users and Computers in the left navigation panel.
Configuring D3 SOAR to Work with Active Directory
Log in to D3 SOAR.
Find the Active Directory integration.
Navigate to Configuration on the top header menu.
Click on the Integration icon on the left sidebar.
Type Active Directory in the search box to find the integration, then click it to select it.
Click New Connection, on the right side of the Connections section. A new connection window will appear.
Configure the following fields to create a connection to Active Directory.
Connection Name: The desired name for the connection.
Site: Specifies the site to use the integration connection. Use the drop-down menu to select the site. The Share to Internal Sites option enables all sites defined as internal sites to use the connection. Selecting a specific site will only enable that site to use the connection.
Recipient site for events from connections Shared to Internal Sites: This field appears if you selected Share to Internal Sites for Site to let you select the internal site to deploy the integration connection.
Agent Name (Optional): Specifies the proxy agent required to build the connection. Use the dropdown menu to select the proxy agent from a list of previously configured proxy agents.
Description (Optional): Add your desired description for the connection.
Tenant (Optional): When configuring the connection from a master tenant site, you have the option to choose the specific tenant sites you want to share the connection with. Once you enable this setting, you can filter and select the desired tenant sites from the dropdowns to share the connection.
Configure User Permissions: Defines which users have access to the connection.
Active: Check the tick box to ensure the connection is available for use.
System: This section contains the parameters defined specifically for the integration. These parameters must be configured to create the integration connection.
1. Input the Server Address.
2. Input the Domain Name. See Identifying the Domain Name for more details.
3. Input your account Username. See step 2 of Creating a User.
4. Input your account Password. See step 3 of Creating a User.Enable Password Vault: An optional feature that allows users to take the stored credentials from their own password vault. Please refer to the password vault connection guide if needed.
Connection Health Check: Updates the connection status you have created. A connection health check is done by scheduling the Test Connection command of this integration. This can only be done when the connection is active. To set up a connection health check, check the Connection Health Check tick box. You can customize the interval (minutes) for scheduling the health check. An email notification can be set up after a specified number of failed connection attempts.
Test the connection.
Click Test Connection to verify the account credentials and network connection. If the Test Connection Passed alert window appears, the test connection is successful. You will see Passed with a green checkmark appear beside the Test Connection button. If the test connection fails, please check your connection parameters and try again.
Click OK to close the alert window.
Click Add to create and add the configured connection.
Commands
Active Directory includes the following executable commands for users to set up schedules or create playbook workflows. With the Test Command, you can execute these commands independently for playbook troubleshooting.
READER NOTE
Certain permissions are required for each command. Please refer to the Permission Requirements and Configuring Active Directory to Work with D3 SOAR for details.
Disable AD User Accounts
Disables the specified Active Directory user accounts.
READER NOTE
Changes may not be reflected on the Active Directory application immediately after running this command. To view the changes, please refresh the AD page.
This command required the Account Operators permission. If insufficient permissions are granted, the command may still return a success message. However, this does not guarantee the successful execution of the disabling process. The user status will remain unchanged when you refresh the page.
Avoid disabling the account that your connection is currently using, as doing so will render the connection unusable for other commands.
Input
Input Parameter | Required/Optional | Description | Example |
Usernames | Required | The usernames of the AD user accounts to disable. |
JSON
|
Output
Error Handling
If the Return Data is Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or directory services, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input. | Disable AD User Accounts failed. |
Status Code | The response code issued by the server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Active Directory portal. Refer to the HTTP Status Code Registry for details. | Status Code: 404. |
Message | The raw data or captured key error message from the directory service about the request failure. | Message: The user is not found in AD. |
Error Sample Data Disable AD User Accounts failed. Status Code: 404. Message: The user is not found in AD. |
Enable AD User Accounts
Enables the specified Active Directory user accounts.
READER NOTE
Changes may not be reflected on the Active Directory application immediately after running this command. To view the changes, please refresh the AD page.
This command requires the Account Operators permission. If insufficient permissions are granted, the command may still return a success message. However, this does not guarantee the successful execution of the enabling process. The user status will remain unchanged when you refresh the page.
Input
Input Parameter | Required/Optional | Description | Example |
Usernames | Optional | The usernames of the AD user accounts to enable. |
JSON
|
Output
Error Handling
If the Return Data is Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or directory services, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input. | Enable AD User Accounts failed. |
Status Code | The response code issued by the server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Active Directory portal. Refer to the HTTP Status Code Registry for details. | Status Code: 404. |
Message | The raw data or captured key error message from the directory service about the request failure. | Message: The user is not found in AD. |
Error Sample Data Enable AD User Accounts failed. Status Code: 404. Message: The user is not found in AD. |
Find Users
Returns detailed user information based on the specified query criteria.
READER NOTE
All input parameters are labeled optional. However, at least one of the input parameters must be defined in order to run this command. Multiple parameters can be defined simultaneously, but they will be processed using an "and" logic.
Input
Input Parameter | Required/Optional | Description | Example |
First Name | Optional | The whole or partial first name to query users. Use an asterisk (*) to partially match the name. For instance, if the name begins with "An," enter "An*." If the name ends with "na," enter "*na." If the name contains "nn," enter "*nn*." If the name is "Anna," simply enter "Anna." Note: At least one of the input parameters must be defined in order to run this command. | An* |
Last Name | Optional | The whole or partial last name to query users. Use an asterisk (*) to partially match the name. For instance, if the name begins with "Gil", enter "Gil*". If the name ends with "pie", enter "*pie". If the name contains "illesp", enter "*illesp*". If the name is "Gillespie," simply enter "Gillespie". Note: At least one of the input parameters must be defined in order to run this command. | Gilles* |
Common Name | Optional | The whole or partial common name of users to query users. Use an asterisk (*) to partially match the name. For instance, if the common name begins with "User", enter "User*". If the common name ends with "er1", enter "*er1". If the common name contains "ser", enter "*ser*". If the name is "User1", simply enter "User1". Note: At least one of the input parameters must be defined in order to run this command. | *lles* |
Email Address | Optional | The whole or partial user email addresses to query users. Use an asterisk (*) to partially match the email address. For instance, if the email address begins with "User", enter "User*". If the email address ends with "abc.com", enter "*abc.com". If the email address contains "ser", enter "*ser*". If the email address is "user1@abc.com", simply enter "user1@abc.com". Note: At least one of the input parameters must be defined in order to run this command. | test@* |
Output
Error Handling
If the Return Data is Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or directory services, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input. | Find Users failed. |
Status Code | The response code issued by the server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Active Directory portal. Refer to the HTTP Status Code Registry for details. | Status Code: 404. |
Message | The raw data or captured key error message from the directory service about the request failure. | Message: Users not found. |
Error Sample Data Find Users failed. Status Code: 404. Message: Users not found. |
Get Users by Username
Retrieves detailed information on the specified Active Directory user(s).
Input
Input Parameter | Required/Optional | Description | Example |
Usernames | Required | The login username(s) to retrieve corresponding user info. |
JSON
|
Output
Error Handling
If the Return Data is Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or directory services, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input. | Get Users by Username failed. |
Status Code | The response code issued by the server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Active Directory portal. Refer to the HTTP Status Code Registry for details. | Status Code: 404. |
Message | The raw data or captured key error message from the directory service about the request failure. | Message: The user is not found in AD. |
Error Sample Data Get Users by Username failed. Status Code: 404. Message: The user is not found in AD. |
Get Computer
Retrieves detailed information on the specified Active Directory computer(s).
READER NOTE
The input parameter Hostnames is required to run this command.
Hostnames can be obtained from the Active Directory client. Please note that this parameter accepts the display name of the host, not its DNS name.
Input
Input Parameter | Required/Optional | Description | Example |
Hostnames | Required | The hostnames of the AD user computers to retrieve detailed information. |
JSON
|
Output
Error Handling
If the Return Data is Partially Successful or Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or directory services, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input. | Get Computer failed. |
Status Code | The response code issued by the server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Active Directory portal. Refer to the HTTP Status Code Registry for details. | Status Code: 404. |
Message | The raw data or captured key error message from the directory service about the request failure. | Message: The hostname is not found in AD. |
Error Sample Data Get Computer failed. Status Code: 404. Message: The hostname is not found in AD. |
Get User logon/logoff Information from AD
Returns the logon and logoff time of the specified Azure Directory user(s).
READER NOTE
You can access the logon and logoff information through the Event Viewer. However, this command can only retrieve user logon and logoff information with the task category of Other Logon/Logoff Events.
Below is an example of a logon and logoff information log from an administrator in the Event Viewer.
Input
Input Parameter | Required/Optional | Description | Example |
Usernames | Required | The usernames of the AD user accounts to retrieve logon and logoff times. |
JSON
|
Start Time | Optional | The start time of the time range to filter returned logs in UTC time. | 2023-02-15 00:00 |
End Time | Optional | The end time of the time range to filter returned logs in UTC time. | 2023-02-22 00:00 |
Output
Error Handling
If the Return Data is Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or third-party directory services, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input. | Get User logon/logoff Information from AD failed. |
Status Code | The response code issued by the server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Active Directory portal. Refer to the HTTP Status Code Registry for details. | Status Code: 403. |
Message | The raw data or captured key error message from the directory service about the request failure. | Message: Invalid server address. |
Error Sample Data Get User logon/logoff Information from AD failed. Status Code: 403. Message: Invalid server address. |
Get Users By Group
Retrieves a list of Active Directory users of the specified group.
READER NOTE
If you encounter a group that returns a success message with no results, it could be because the group is a system group. To address this issue, consider searching for a customized group instead.
Input
Input Parameter | Required/Optional | Description | Example |
Group Name | Optional | The name of the group to return a list of users. | Test Group |
Output
Error Handling
If the Return Data is Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or third-party directory services, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input. | Get Users By Group failed. |
Status Code | The response code issued by the server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Active Directory portal. Refer to the HTTP Status Code Registry for details. | Status Code: 404. |
Message | The raw data or captured key error message from the directory service about the request failure. | Message: The Group Name is not found in AD. |
Error Sample Data Get Users By Group failed. Status Code: 404. Message: The Group Name is not found in AD. |
Reset User Password
Resets the specified Active Directory user's password.
READER NOTE
If you encounter the "LDAPStartTLSError: startTLS failed - unavailable" error, you can resolve it by setting up LDAPS on your Windows Server. Refer to this link for a step-by-step guide on how to set up LDAPS. Once you have successfully set up LDAPS, the error should no longer occur.
Input
Input Parameter | Required/Optional | Description | Example |
Username | Optional | The username of the AD user to reset password. | Sysint |
New Password | Optional | The new password. | ***** |
Confirm Password | Optional | The new password re-entered for confirmation. | ***** |
Output
Error Handling
If the Return Data is Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or directory services, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input. | Reset User Password failed. |
Status Code | The response code issued by the server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Active Directory portal. Refer to the HTTP Status Code Registry for details. | Status Code: 404. |
Message | The raw data or captured key error message from the directory service about the request failure. | Message: The user is not found in AD. |
Error Sample Data Reset User Password failed. Status Code: 404. Message: The user is not found in AD. |