TABLE OF CONTENTS
- On-premise ADI
- Downloading and Configuring AD Sync Tool
- Synchronizing Active Directory (AD)
- Setting up a Regular Sync for Windows 10 Users
- Additional things to know about the AD Sync Tool
On-premise ADI
The On-premise Active Directory Integration (OADI) allows you to synchronize your Microsoft On-premise Active Directory Users and Groups to your Phish Insight account. This feature uses AD Sync Tool to retrieve and upload the information from your Active Directory securely. You can visit our Data Privacy Policy F.A.Q. article to know more about how Phish Insight protects your data.
After the integration, you can use the synchronized Users and Groups' information in your phishing simulation and training campaigns.
How does the On-premise ADI Work?
- Download and configure the AD Sync Tool.
- Start the synchronization.
- The AD Sync Tool will use your configuration to access the Active Directory, retrieve Users and Groups' information, and uploads this data to our Phish Insight servers.
- Phish Insight will put the Users and Groups' information to your account. Please take note that it will overwrite all previous synced AD information.
Things to prepare before using On-premise ADI
- Microsoft On-premise Active Directory
Note: Confirm if your Active Directory is only reachable through a proxy. If yes, you will need to configure the proxy in your AD Sync Tool later.- It should be running version 2006 or higher.
- It should be running version 2006 or higher.
- PC to run AD Sync Tool
Note: You can run your AD Sync Tool in a PC that has any of the following requirement.- Windows Desktop 7/Vista/8/10
- Windows Server 2008/2012/2016/2019 (64 bit)
- Windows OS which have .net framework 3.xx and above
- Domain information
Note: The AD Sync Tool can support multiple domains.- IP address or Server FQDN - the domain where the AD Sync Tool will query the information
- Username/Password to query LDAP: An AD account that has permission to perform LDAP queries on your domain
- Group names, e.g. `All of Company Users` (if you like to sync users under specific groups)
Note: Specifying group name is case insensitive and strict in spelling.
Important: Please note that we will only sync groups with a type equal to "Distribution". Groups with a type equal to "Security" will not be synced.
Downloading and Configuring AD Sync Tool
- Log in to your Phish Insight account then go to Settings and click AD synchronization.
- Click On-premise AD.
- Click Set active data source so you can see your users and groups after the sync.
- Click Download to download an AD sync tool.
- Click Download to confirm.
- Extract the downloaded file. Open a command prompt and go to the directory of the extracted folder.
Tip: You can go to the file explorer, open the extracted folder and type cmd in the address bar. It will automatically open command prompt and go to the directory of the folder. - In the command prompt, execute this command: ADSyncTool.exe -c
- Start the configuration.
- Specify the Active Directory server FQDN or IP address.
- Specify the user name (domain\user name).
- Specify the password.
- Does your Active Directory server need a proxy to connect?
- If yes, press y then enter. You can now start adding proxy configuration.
- Specify the proxy server protocol (HTTP or SOCKS5).
- Specify the proxy server FQDN or IP address.
- Specify the proxy server port number.
- Does the proxy server require authentication?
- If yes, press y then enter. You can now start adding proxy server credentials.
- Specify the user name.
- Specify the password.
- If no, press n then enter.
- If yes, press y then enter. You can now start adding proxy server credentials.
- If yes, press y then enter. You can now start adding proxy configuration.
- Ad Sync Tool will then verify your configuration. If your configuration is invalid, please update the configuration again.
- Specify the type of email you want to sync.
- p - Primary SMTP address is the primary email address of an Exchange recipient object. For example, SMTP:[email protected].
- s - Secondary SMTP address is the secondary email address of an Exchange recipient object, which can have multiple secondary email addresses.. For example, smtp:[email protected].
References: Primary and Secondary SMTP Address Terminology
- p - Primary SMTP address is the primary email address of an Exchange recipient object. For example, SMTP:[email protected].
- Specify group names that you want to sync.
- Specify a group.
- Do you have another group to sync?
- If yes, press y then enter
- If no, press n then enter.
Tip: You can directly edit the CustomGroupsFilter.config file to add the groups you wish to sync. You can right click on the file, open with Notepad, add your groups and then save.
- Specify a group.
Synchronizing Active Directory (AD)
- On the command prompt, enter the command :
ADSyncTool.exe -s
- The AD Sync Tool will start retrieving your AD information. Once the information is retrieved, the tool will upload it to your Phish Insight account.
What to do when the synchronization is unsuccessful?
- You must first configure Active Directory settings. Please execute [ADSyncTool.exe -c] before syncing.
- Cause: You have not added any configuration to the agent that it can use to fetch data from your Active Directory.
- Solution: Please follow the instructions for downloading and configuring the AD Sync Tool first. You can proceed to sync again afterward.
- Cause: You have not added any configuration to the agent that it can use to fetch data from your Active Directory.
- Active Directory data retrieval: unsuccessful
- ERROR: Unable to connect to the domain. Kindly verify your configuration settings.
- Cause: You may have added invalid server FQDN, username, or password in the AD Sync Tool configuration. The tool needs a valid configuration to acquire authorization and fetch any data from your Active Directory.
- Solution: Please configure the AD Sync Tool connection settings again and make sure that you add valid server FQDN, username, and password.
- ERROR: No users or groups found. Kindly verify your configuration settings.
- Cause: You may have added non-existing group. The tool needs at least 1 valid group to fetch user and group data.
- Solution: Please configure the AD Sync Tool Groups again and make sure that you add an existing and valid group.
Note: You can do this without overwriting the Active Directory connection settings.
- ERROR: Unable to connect to the domain. Kindly verify your configuration settings.
- Active Directory data upload: unsuccessful
- ERROR: This AD Sync Tool is not valid. Please verify the source of the application.
- Cause: You are trying to sync with an AD Sync Tool that is not from Phish Insight.
- Solution: Use the AD Sync Tool downloaded from Phish Insight.
- Cause: You are trying to sync with an AD Sync Tool that is not from Phish Insight.
- ERROR: This AD Sync Tool is not active. Please sync from the active AD Sync Tool to upload.
- Cause: You are trying to sync with an Inactive AD Sync Tool. For security purposes, the system will only allow a sync from the most recently downloaded AD Sync Tool.
- Solution: Please use the latest downloaded AD Sync Tool. If you do not have the latest tool, you can download a new one.
- ERROR: This AD Sync Tool is not valid. Please verify the source of the application.
- You must first configure Active Directory settings. Please execute [ADSyncTool.exe -c] before syncing.
Setting up a Regular Sync for Windows 10 Users
Setting up a regular sync with the AD Sync Tool is divided into two parts, Creating the ADSync script and Scheduling the task.
Creating the ADSync Script
- Open the folder of your AD Sync Tool.
- Click on the right empty part of the address bar, and it will highlight the address of your AD Sync Tool folder. Right-click on it and choose Copy.
Tip: Once you click on the address bar, you can press Ctrl + C to copy the address of your AD Sync Tool.
- Once you have the AD Sync Tool address ready, open the Windows Start Menu.
- Search for Notepad and click it to open.
- On the notepad, type cd then space. After that, right-click and click Paste.
- Press Enter to create new line.
- Type the sync command
ADSyncTool.exe -s
- Click File menu on the top of the notepad, and select Save As.
- On the "Save as type" field, change type from Text Documents(*.txt) to All Files.
- On the "File Name" field, type adsync.ps1 then click Save.
You can proceed in scheduling the task after saving the created ADSync Script.
Scheduling the task
- Open Windows Start Menu.
- Search for Task Scheduler and click it to open.
- Click the "Task Scheduler Library" branch to make the folder active. Right-click the "Task Scheduler Library" branch and select the New Folder option.
- Type ADIntegration as the name for the folder.
- Click the OK button.
- Expand the "Task Scheduler Library" branch, and select the ADIntegration folder.
- Click the Action menu.
- Select the Create Basic Task option.
- In the "Name" field, type ADSync as a short descriptive name for the task.
- In the "Description" field, copy "This task is for syncing AD information to Phish Insight Account" as your task description.
- Click the Next button.
- Select the Weekly option.
Depending on your requirements, you can select select any recurrence you like. In this example, we will be selecting the option to run the sync every week. - Click the Next button.
- Using the "Start" settings, specify when the task should start running and the time (crucial).
In this example, we will be scheduling the tasks to run at 9:00 AM every Monday of the week starting August 23, 2020.
- Click the Next button.
- Select the Start a program option to execute the script file.
- Click Browse.
- Go to the folder where the ADSync script is. Click the file then click Open.
- Click Next.
- Click the Finish button.
Once you've completed the steps, the task will run automatically on the schedule you have specified.
References:
How to create automated task using task scheduler windows 10
Ways To Start Task Scheduler Windows
Additional things to know about the AD Sync Tool
- Only the Active AD Sync Tool is allowed to sync AD information. The Active AD Sync Tool is the latest downloaded agent from your Phish Insight account, and all previous agents are obsolete.
- AD Sync Tool does not support regular sync on its own, but you can set it up using Task Schedulers.