Active Directory (AD) User synchronisation enables you to connect your Active Directory to your Phriendly Phishing account. When an individual is configured in your AD then they will automatically synchronise this new staff member in your Phriendly Phishing account.
As a Phriendly Phishing administrator, you will be able to configure AD user synchronisation.
Requirements
The latest version of Remote Server Administration Tools should be installed.
Remote Server Administration Tools for Windows 10
Remote Server Administration Tools for Windows 7 with Service Pack 1
1. Install your AD Attributes Script in your Phriendly Phishing account
- Log in to Phriendly Phishing. Go to Settings
and follow through per the screenshot below.
-
Expand AD Synchronisation. Click the Download The Get Attributes Script button and save the PowerShell script. Please also take note of the Authentication Token location as you will use that later on.
- From an AD connected machine, run PowerShell in Administrator mode, right-click on the Get Attributes Script, and copy the file name.
- Navigate to the directory that the Get Attributes Script was downloaded to and use the CD command. Back in PowerShell type without quotations ‘.\’ then paste in the file name followed by ‘.ps1’ and hit enter.
- PowerShell will ask you to enter the Authentication Token (see step 2).
-
Copy the Authentication Token to the clipboard and input that into PowerShell. Hit enter.
- You will now see a Sync Successful message.
- Go back to Phriendly Phishing platform, refresh the page and you will see a red notification on the bell icon. Click the bell and then ‘Click to proceed’.
2. Configure your AD Attributes in Phriendly Phishing
Warning
- It is important to configure the attributes to ensure the AD script is transferring the right information for your staff.
- When synching users, Users from a Nested Group are not recognised. These nested groups need to be specified in the learner group field.
- The AD Security Group name is shown as Segment in Learners section.
- SID as Unique Identifier is recommended as Email Address is automatically updated if the email is changed (refer to Step 3 below).
- It is required that the ‘Key attribute’ is an attribute in an email address format (refer to Step 4 below).
- In the platform, Settings > User Sync > Learner Sync expand AD Synchronisation
- Scroll down to Generate AD Synchronisation Script with Attributes and enter the AD Security Group you want to sync.
- Set SID as Unique Identifier.
-
Scroll down to the Search box and tick any attributes that you would like to import into Phriendly Phishing. Select your required attributes by dragging the attributes to the dashed-line boxes.
- Once done, save your configuration.
3. Download your AD User Script
- In the platform, download the AD Synchronise Script.
- Open PowerShell in Administrator Mode and copy the file name of the AD Synchronise Script downloaded previously.
- In PowerShell type without quotations ‘.\’ and paste the file name followed by ‘.ps1’ and hit enter. Eg: ‘.\ph2_get_ad_users_20190724150445.ps1’
- PowerShell will ask you to enter the Authentication Token. This is the same token in previous steps and can be found when you expand AD Synchronisation.
- Copy the Authentication Token to the clipboard and input the token into PowerShell and hit enter.
- You will see a Sync Successful Message.
-
Go back to your Phriendly Phishing account, refresh the page and you will see a red notification under the bell icon. Click it and then Click to view.
4. Validate User Data
This step, lets you validate that the information pulled from AD is correct before syncing to Phriendly Phishing. There are 2 options to review data that has synced to your Phriendly Phishing account prior to enabling the sync button.
Option 1
- From an AD connected machine run PowerShell in Administrator mode.
- Copy the file name of the ‘AD Synchronise Script’ you just downloaded to clipboard.
- In PowerShell type without quotations ‘.\’ and paste in the file name followed by ‘.ps1’ -preview -limit 5 and hit enter. Eg: ‘.\ph2_get_ad_users_20190724150445.ps1 -preview -limit 5’
- PowerShell will ask you to enter the Authentication Token. It is the same token you used previously.
- Enter the Authentication Token into PowerShell and press enter.
- You will now see the total number of learner and also a preview of their information pulled from AD.
- Review that all information is correct.
Option 2
-
In the platform, expand AD Synchronisation and scroll down to Preview sample learners list and Download CSV.
- The ‘Preview processed data’ CSV file shows each learner's email address, first name, last name, and whether the learner was ‘Added’, ‘Updated’, ‘Removed’, or if an email is ‘Invalid’.
5. Enable AD Synchronisation
- Once you have confirmed the data is accurate and you are ready to sync users from your AD, please click the ‘Enabled’ button next to AD Synchronisation.
- A Sync Data Success box will appear. Click Finish
- Navigate to Learners section in the platform to view learners synched to Phriendly Phishing.
6. Configure the Task Scheduler
- Select Action > Create Task.
- Once Task has been created, under General tab, fill out fields per below screenshot.
- Under Triggers tab.
- For the new Trigger, the Recommendation is setting the sync weekly at a minimum.
- Under Actions tab, click New.
- Once created, fill out per below for Program/script.
- Select Add arguments, fill out -ExecutionPolicy Bypass C:\<path of script location>\ph2_get_ad_users.ps1 -token <your unique id obtained in the platform.
-
Click OK.
Warning
- There should be no spaces in the file path as it will cause issues with Powershell's ability to parse the arguments provided in the scheduled task.
- For Example : If the script is located at C:\Phriendly Phishing\get_ad_users.ps1, you will either need to do any of below bullet points:
- Update the path to remove any space characters (i.e. C:\PhriendlyPhishing\get_ad_users.ps1)
- Ensure the path to the script is encapsulated in quotes in the scheduled task arguments (-ExecutionPolicy Bypass "C:\Phriendly Phishing\get_ad_users.ps1" -token <token_goes_here>)
Congratulations! You have successfully configured synching your Learners straight from your Active Directory.
Comments
Please sign in to leave a comment.