Skip to content

How to filter contact search by domain

Configuration Scope: Environment-Specific

This setting is environment-specific and must be configured separately in each environment (dev, test, prod). Changes here will not be included in configuration exports.

Brief Connect's contact search pulls results from multiple sources. By default, it searches the organization's Entra ID as well as internal Brief Connect lists for custom contacts and organizations. This feature allows administrators to limit the Entra ID search results to only include users from specific, administrator-defined email domains.


How it Works

When a user searches for a contact, Brief Connect queries three sources and presents the results in a specific, prioritized order:

  1. Custom Contacts: People who have been added manually to Brief Connect.

  2. Organizations: Organizations that have been added manually to Brief Connect.

  3. Entra ID (Azure AD): All users within your organization's directory.

Note: The domain filter only applies to the Entra ID search results. Custom contacts and organizations that you have added directly within Brief Connect will always be returned in search results, regardless of their email domain.


Configuration

The domain filter is controlled by a single environment variable. If this variable is not set or is left empty, the feature is disabled, and no filtering is applied.

Environment Variable: GraphUserFilterDomains

To configure the filter, set the GraphUserFilterDomains variable to a semicolon-separated list of the domains you wish to include in the search results.

Configuration Example

An administrator wants to ensure that contact searches only return users from the primary company domain (engagesq.com) and a secondary domain used for external accounts (outlook.com).

The environment variable would be as follows:

GraphUserFilterDomains=engagesq.com;outlook.com

Resulting Behavior:

  • A search for "John" would return johnconnect.admin@engagesq.com and johnconnect.user@outlook.com from Entra ID.

  • It would not return a user like john@externalconsultant.com from Entra ID.

  • However, if a custom contact for david.p@externalconsultant.com was manually added within Brief Connect, it would still be returned at the top of the search results, as the filter does not apply to custom contacts.