Selecting & Filtering Directory Sources
The Directory Plus web part can be configured to display only those specific users you wish to include in the directory. To begin, edit the web part and navigate to Page 2 of the web part properties pane.
On this page:
Configuration is broken into two main components—the selection of a Directory Source, which defines the pool of users that are queried, followed by the configuration of Directory Exclusion Filters, which further restricts and removes users from the initial Directory Source query.
Directory Source
The “Directory Source” field is the starting point for defining who is displayed within the web part.
Entire Directory
When the entire directory is used as the Directory Source, Directory Plus will query Microsoft Entra for all user accounts in your tenant before applying any applicable filter rules.
Specific Group(s)
When one or more groups are defined, Directory Plus will query Microsoft Entra for the membership of those groups before applying any applicable filter rules.
Specific People
When one or more specific people are defined, Directory Plus will query Microsoft Entra for only those users.
Birthday Query
When the Birthday Query option is selected, a Time Period choice will appear, allowing you to select whether you want to show birthdays for the current day, week, month, or quarter. When enabled, Directory Plus will query Microsoft Entra for all users, and filter by the user’s birthday to determine if they meet the chosen time period.
Hire Date Query
When the Hire Date Query option is selected, additional choices for Query Type and Time Period will be shown. The Query Type allows you to choose between displaying anniversaries or a list of new hires, while the Time Period choice allows you to select whether you want to show those anniversaries or new hires for the current day, week, month, or quarter.
When displaying new hires, Directory Plus will ignore any user whose hire date is not this year, while displaying anniversaries will ignore any user whose hire date is this year.
NOTE: The page must be reloaded after making changes to the Directory Source fields.
Directory Exclusion Filters
Once you have configured a Directory Source, you may elect to configure exclusion filters to further restrict the users shown in the directory. Click the “Directory Exclusion Filters” button underneath the Directory Source controls to enter the filter wizard.
NOTE: If your exclusion filters rely on metadata from custom attributes, configure the mapping of your custom attributes first.
Group Exclusion
When entering one or more groups in the “Exclude users in the following group(s)” field, Directory Plus will exclude any user that is a member of any of the selected groups.
State Exclusion
These rules apply common filters based on the user’s state and status in Microsoft Entra.
Hide guest accounts: Removes guest/external accounts from the directory.
Hide inactive accounts: Removes any account that is not active. This rule ensures that departing employees are automatically removed from the directory when their account is disabled, regardless of their group membership.
Hide accounts with no mailbox: Removes any account that does not have an assigned mailbox. This rule is useful for filtering out service or resource accounts that would have otherwise been displayed.
Hide accounts with no first & last name: Removes any account where the given name and surname fields are both blank. This rule is useful for filtering out service or resource accounts that would have otherwise been displayed.
Rule-Based Exclusion
In addition to the filtering capabilities noted above, custom rules may be added to exclude users that meet specific criteria. In order for a user to be displayed in the directory, they must pass ALL of the configured filter criteria.
Creating Filters
Click the “New Filter” button and select the field you wish to use to apply the filter. Most Entra ID fields, and mapped custom attributes may be used to define an exclusion rule.
The “Comparison” dropdown will indicate the type of comparison you wish to perform for the chosen field. Note that the available comparison choices will vary based on the type of data the chosen field contains.
Text fields: Contains, Does Not Contain, Does Not End With, Does Not Start With, Ends With, Equal To, Not Equal To, Starts With
Lists (Arrays): Contains, Does Not Contain
NOTE: The page must be reloaded after making and saving any changes to the Directory Exclusion Filters.
Display Name Format
Page 2 of the web part property pane also provides an option to override the display name format that is shown in the directory. By default, the user’s display name from Entra ID is used, however for organizations where their Entra accounts are set to “Last, First”, it may make sense to override how names are shown in the directory to “First Last” to facilitate more intuitive search of the directory. When changing the display format behavior, reloading the page is required before the changes will be displayed.