CanIPhish support advanced filtering when syncing an Azure AD or Google Workspace Directory Group.
To utilise Directory Sync Filtering, simply add one or more filter values against a directory attribute. By default, values entered look for an exact match - but are case insensitive.
Each filter acts as an AND operator. For example, if filter 1 is against the Location Attribute and set to 'Australia' and filter 2 is against the Department Attribute and set to 'IT' then only users who fit both criteria will be added to the employee list.
When adding multiple values to a filter, each value entered acts as an OR operator. For example, if a filter is set against the Department Attribute and the values are 'IT' and 'Finance' then we will look for employees who have either 'IT' OR 'Finance' in the Department Attribute.
Wildcard and NOT Operators
When adding attribute values you can use wilcards and NOT operators to help filter for employees who contain a certain word in an attribute or remove employees who have a certain word.
To use a wildcard, simply place a star '*' at the beginning and/or end of the value you want to filter for. For example, using the value '*Developer*' in the JobTitle attribute, will look for any employee who has the keyword 'Developer' in their JobTitle.
To use a NOT operator, simply place a '!' at the beginning of the value you want to filter out. For example, using the value '!Developer' in the JobTitle attribute, will exclude any employee who has the exact JobTitle of 'Developer'.
Using both a Wildcard and NOT Operator in a single value
To use a Wilcard and a NOT operator, simply place a '!' at the beginning of the value you want to filter out. Then place your wilcard immediately after this if you want to wildcard the beginning of the value, and optionally include a wildcard at the end. For example, using the value '!*Developer*' will exclude any employees who have the keyword 'Developer' anywhere in their JobTitle.
No filters applied:
Exact match filter applied for 'Demo':
Wildcard match filter applied for '*em*'
NOT match filter applied for '!Demo'