The Synchronization Disaster
When an enterprise migrates to Google Workspace, they rarely abandon their on-premise Microsoft Active Directory (AD). Instead, they use Google Cloud Directory Sync (GCDS) to create a one-way mirror. GCDS connects to the local AD via LDAP, reads every user, group, and organizational unit, and replicates them into Google Workspace in the cloud.
This is highly efficient, but it contains a hidden danger: Destructive Synchronization. By default, GCDS assumes that Active Directory is the absolute source of truth. If a user account or an email group exists in Google Workspace but does NOT exist in the on-premise Active Directory, GCDS will assume it is an unauthorized anomaly and delete it from Google Workspace during the next sync cycle.
This becomes catastrophic if your company uses Google Workspace for external collaboration. If your marketing team creates a Google Group called [email protected] directly in the Google Admin Console, the next time GCDS runs, it won’t find that group in the local AD, and it will instantly delete the group, breaking communication for the entire project. To prevent this, you must configure strict Object Exclusions in the Configuration Manager.
Step 1: Launching the Configuration Manager
GCDS is not configured in the cloud; it is a Java application that runs on a physical server (or VM) inside your network, usually on the same server acting as a Domain Controller.
- Log into the Windows Server hosting GCDS.
- Open the Configuration Manager application.
- Load your existing XML configuration file (e.g.,
sync_config.xml).
Step 2: Defining User Exclusions
If you have Super Administrator accounts in Google Workspace (like [email protected]) that intentionally do not exist in Active Directory for security reasons, you must exclude them.
- In the left-hand navigation pane, click on Google Domain Configuration and expand it.
- Click on Exclusion Rules.
- Click the Add Exclusion Rule button.
- Type: Select
User Email Address. - Match Type: Select
Exact Match. - Rule: Type
[email protected]. - Click OK.
(Pro-Tip: If you have an entire OU of cloud-only accounts, you can change the Match Type to Regular Expression and exclude everything under a specific path, or use a prefix match like ^cloud-.*).
Step 3: Defining Group Exclusions
This is the most common failure point. Cloud-native Google Groups must be protected.
- Stay in the Exclusion Rules section.
- Click Add Exclusion Rule.
- Type: Select
Group Email Address. - Match Type: Select
Regular Expression. - Rule: If your company prefixes all cloud-only groups with “ext-“, you would type:
^ext-.*@yourcorp\.com$ - Click OK.
Step 4: The Simulation (Dry Run)
Before you ever apply an updated XML file to a production environment, you must simulate the synchronization. If your regex is slightly wrong, you could still accidentally delete thousands of objects.
- In the left-hand navigation pane, click on Sync.
- Click the Simulate Sync button.
GCDS will now query the local AD, query Google Workspace, and build a mathematical model of the changes it would make. It will output a massive text log.
Step 5: Analyzing the Output
You must meticulously read the Simulation Log, specifically the Proposed Deletions section.
- Look at the
Users to be deletedlist. Ensure yoursuper-adminaccount is NOT on this list. - Look at the
Groups to be deletedlist. Ensureexternal-contractorsis NOT on this list.
If the simulation shows exactly 0 proposed deletions for your protected objects, your Exclusion Rules are syntactically perfect. You can now click Sync & Apply Changes to commit the configuration to the live environment, ensuring your cloud-native infrastructure is permanently shielded from the ruthless one-way mirror of Active Directory.