Others

Create an Azure AD Connect Rule to Exclude Users Without a Mail Attribute

Olivia MillerOlivia Miller Nov 27, 2026 868 views

Question details

Create a synchronization rule that excludes users whose mail attribute is not populated.

Exclude Users Without a Mail Attribute in Azure AD Connect
Product
Microsoft Entra Connect Sync (formerly Azure AD Connect)
Device & OS
not provided
Scenario
An administrator wants to prevent thousands of users without mail properties from synchronizing to Microsoft Entra ID.
Observed behavior
User objects without mail values are in scope for synchronization, while mail-enabled users have an msExchRecipientTypeDetails value.
Before you start

Identify the Active Directory connector and verify which users have a null mail attribute, including any accounts that must remain in Microsoft Entra ID. Test the rule on a staging server or a small pilot scope before applying it broadly.

Solution 1Recommended

Create an Inbound Rule That Filters Users With a Null Mail Attribute

Use an attribute-based inbound rule to mark matching users for exclusion from synchronization.

This approach checks the mail attribute directly. If msExchRecipientTypeDetails is the intended eligibility criterion instead, validate its values across the affected accounts before changing the rule.

Applying the filter to users already synchronized can delete their Microsoft Entra ID objects. Review the proposed exports and the accidental-deletion threshold before proceeding.

1
Open the rule editor

On the Microsoft Entra Connect Sync server, open Synchronization Rules Editor and select Inbound. Click Add new rule.

2
Define the inbound rule

Give the rule a descriptive name, select the relevant Active Directory connector, set the connected system object type to user and the metaverse object type to person, and choose Join as the link type. Assign an unused precedence value that gives the rule priority over conflicting rules.

3
Set the user scope

Under Scoping filter, add a clause for the mail attribute with the ISNULL operator. Add any necessary pilot or exception conditions and verify that they select only the intended users.

4
Mark matching users for exclusion

Under Transformations, add a constant flow with True as the source and cloudFiltered as the target attribute. Save the rule.

5
Preview and review synchronization

In Synchronization Service Manager, use the connector space search and Preview on representative users with and without mail values. Run the required full synchronization for the affected connector in the test environment, then inspect pending exports before allowing changes to reach Microsoft Entra ID.

Create an Inbound Rule That Filters Users With a Null Mail Attribute
Review existing cloud accounts: Filtering an already-synchronized user can result in deletion of the cloud object. Confirm the impact on access and dependent services before enabling the rule in production.
Free Microsoft Office alternative

Review Your User Inventory With WPS Spreadsheets

WPS Office is a free, lightweight Office alternative with a familiar interface and Microsoft Office format compatibility. Use WPS Spreadsheets to review an exported user inventory as part of your migration workflow; it does not configure or fix Microsoft Entra Connect synchronization rules.

Review exported mail and recipient-type values in a spreadsheet before planning a filter.Open and edit Microsoft Excel XLSX files for compatibility with existing inventories.Use a familiar spreadsheet interface to make the transition from Microsoft Office easier.Work with a free, lightweight office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Will the rule remove users who are already synchronized?

It can. Users newly excluded by the rule may be deleted from Microsoft Entra ID. Check pending exports in Synchronization Service Manager and assess the impact before applying the rule in production.

Should I filter on mail or msExchRecipientTypeDetails?

Use mail with ISNULL if the requirement is specifically to exclude users without a mail value. Use msExchRecipientTypeDetails only if its validated values are a reliable indicator of the users you want to include.

How can I test the rule before a broad rollout?

Use a staging server or add a pilot condition to the rule's Scoping filter. In Synchronization Service Manager, preview representative users and review pending exports before enabling production changes.

Where can I find Microsoft's filtering guidance?

See the Microsoft Entra Connect Sync attribute-based filtering documentation at https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-connect-sync-configure-filtering.