Nested Filters in AD Reports


InfraSOS is designed to streamline your Office 365, Azure AD & Active Directory reporting, auditing security and compliance by providing powerful tools for analyzing and reporting large volumes of data. This guide focuses on one of our key features—Nested Filters. Nested filters, along with logical operators and filter groups, allow you to refine and target your data more effectively, ensuring that your reports capture exactly what you need.

Filter Management

  1. To begin, click the "Filters" button on the report page to open the filter management view (Image 1.1).
(Image 1.1)
  1. Configure the filter and click "Save" to save the configuration (Image 1.2).
(Image 1.2)
  1. Apply the filter by initiating the report generation:
  • If the report has not yet been loaded, click the "Generate Report" button (Image 1.3).
(Image 1.3)
  • If the report has already been generated, click the "Refresh Data" button to reload the data with the applied filters (Image 1.4).
(Image 1.4)

Group Logic Operators

Filter groups are used to create more complex data selection conditions, allowing multiple filters to be combined using different logical operators. This enables more precise and targeted data querying, especially useful when dealing with large datasets or when specific data segmentation is required.

  • AND: Data must meet all conditions within the group.
  • OR: Data must meet any of the conditions within the group.
(Image 2.1. Selecting Logic for the Group)

Examples of Using Filters

Example 1: Simple Filter Using AND

Objective: Find all users from the United States who are from the IT department.

  • Create a filter group with the AND operator.
  • Add filter: "Country Name equals United States".
  • Add filter: "Department equals IT".

This filter ensures that both conditions must be met for the data to be included in the report.

(Image 3.1. Example 1: Simple Filter Using AND)

Example 2: Simple Filter Using OR

Objective: Find all users from either the IT or Technical Support departments.

  • Create a filter group with the OR operator.
  • Add filter: "Department equals IT".
  • Add filter: "Department equals Technical Support".

Using the OR operator, the data will be included if any of the conditions are met, allowing you to capture records for both IT and Technical Support departments.

(Image 3.2. Example 2: Simple Filter Using OR)

Example 3: Complex Filter Using AND and OR

Objective: Identify all users from Canada who are from either the IT or Technical Support departments.

  • Create a main filter group with the AND operator.
  • Add filter: "Country Name equals Canada".
  • Create a nested group with the OR operator within the main group.
  • In the nested group, add filter: "Department equals IT".
  • Add another filter in the nested group: "Department equals Technical Support".

This setup uses a combination of AND and OR operators. The main group ensures that the user must be from Canada, and within that subset, users must meet either of the secondary conditions (IT or Technical Support departments).

(Image 3.3. Example 3: Complex Filter Using AND and OR)

Best Practices

  • Appropriate Combination of Filters: Use groups logically when combining multiple conditions. Avoid overly complex combinations for straightforward tasks.
  • Regular Updates: Continuously review your filters to ensure they remain accurate and relevant as data changes.
  • Start Simple: Begin with simple filters and progressively work towards more complex combinations as you become more familiar with the functionalities.


Understanding and utilizing filters, logical operators, and groups will greatly enhance your ability to manage and analyze large data sets effectively. These tools simplify the process of finding and analyzing the necessary information, thereby making your workflow more efficient.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us