Others

Exclude .local Users from Azure AD Connect Synchronization

Phi Hung VoPhi Hung Vo Nov 25, 2026 868 views

Question details

Create a synchronization rule that excludes specified .local users from Azure AD.

Exclude .local Users from Azure AD Connect Synchronization
Product
Azure AD Connect (Microsoft Entra Connect Sync)
Device & OS
not provided
Scenario
An administrator wants to prevent on-premises Active Directory users matching a .local condition from synchronizing to Microsoft Entra ID.
Observed behavior
Users matching the selected .local condition should be filtered from cloud synchronization.
Before you start

Identify the exact attribute that defines the users to exclude. A user principal name (UPN) ending in .local is not necessarily the same as membership in an AD domain ending in .local; check representative users before creating the filter.

Solution 1Recommended

Create an Inbound Rule to Filter Users with .local UPNs

Use a custom synchronization rule when users whose UPNs end in .local should be excluded from Microsoft Entra ID.

This example filters the userPrincipalName attribute. If the intended scope is an AD domain rather than a UPN suffix, first determine and test an appropriate domain-specific filter.

Filtering users who already exist in Microsoft Entra ID can cause their cloud accounts to be deleted on export. Review the affected users and deletion threshold, and test in a staging environment before applying the rule in production.

1
Open the rule editor

On the Azure AD Connect server, open Synchronization Rules Editor and select Inbound. Choose Add new rule.

2
Configure the rule

Name the rule and select the on-premises AD connector. Set Connected System Object Type to User, Metaverse Object Type to Person, and Link Type to Join. Choose an unused precedence value that gives the custom rule priority over conflicting rules.

3
Set the scope

Under Scoping filter, add a condition for userPrincipalName with the ENDSWITH operator and the value .local. Check that representative users have the expected UPN values.

4
Add the filtering transformation

Under Transformations, add a Constant flow targeting cloudFiltered with the source value True. Save the rule.

5
Run and verify synchronization

After reviewing the expected impact, open PowerShell on the sync server and run Start-ADSyncSyncCycle -PolicyType Initial. In Synchronization Service Manager, check the Operations tab and inspect affected connector-space objects; also review the users and any deletions in the Microsoft Entra admin center.

Create an Inbound Rule to Filter Users with .local UPNs
Review existing cloud accounts: A matching user that is already synchronized may be deleted from Microsoft Entra ID when the change is exported. Confirm the affected accounts and recovery options before proceeding.
Free Microsoft Office alternative

Review Synchronization Reports with WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface and support for common Microsoft Office formats, making it easy to move existing files. Use WPS Spreadsheets to review exported user lists; Azure AD Connect rules must still be configured in Microsoft Entra Connect Sync.

Review exported user lists and .local UPNs in WPS SpreadsheetsOpen and edit Microsoft Excel XLSX filesWork with Word and PowerPoint file formats for easier migrationUse a familiar, lightweight interface at no cost
microsoft office alternative - wps office

Frequently Asked Questions

Does filtering UPNs ending in .local exclude every user in a .local domain?

No. A user's UPN suffix can differ from the AD domain name, and some users may not have an explicit UPN. Check the relevant AD attributes before choosing the scoping filter.

What happens to users who are already synchronized?

If the new rule filters an existing synchronized user, the next export can delete the cloud account. Review the affected users and deletion threshold before running the change, and check the Microsoft Entra admin center afterward.

How do I apply a new synchronization rule?

After saving the rule in Synchronization Rules Editor, run Start-ADSyncSyncCycle -PolicyType Initial in PowerShell on the sync server. Review the runs in Synchronization Service Manager under Operations.

Why might a user still appear in Microsoft Entra ID?

Check that the user's userPrincipalName matches the filter, the rule targets the correct AD connector, and its precedence is appropriate. Then inspect the synchronization and export results in Synchronization Service Manager.