Introduction
In this article, we will discuss the technical details of setting up user and group provisioning. This process connects Active Directory with Cloud Identity or Google Workspace by using Google Cloud Directory Sync (GCDS). The guide will provide step-by-step instructions for setting up the synchronization process. It will also ensure that data is securely transmitted between the two systems.
What is Google Cloud Directory Sync?
Google Cloud Directory Sync allows administrators to synchronize users, groups, and other data. This synchronization occurs from an Active Directory/LDAP service to their Google Cloud domain directory. Let’s look at some of the features of GCDS.
- You can configure GCDS to suspend synchronization for disabled or deleted in Active Directory user accounts.
- You can scope the synchronization by creating a rule similar to Entra ID Connect or Entra Cloud Sync.
- It can be configured to sync organisation units, User Profiles, Custom Schemas, Shared Contacts, Calendar Resources and License.
- You can create a rule to suspend the synchronisation if the deletion count reaches the configured limit.
- It allows sending notifications with the synchronization result.
- You can schedule the synchronization.
- You can configure GCDS to substitute the user suffix domain in Cloud Identity . For instance, replace the actual UserprincipalName from User@myforest1.com to User@frontline.myforest1.com or User@msetlab.com
Note: Google Cloud Directory Sync does not sync passwords from Active Directory. To achieve this, we should use the Password Sync feature. It allows updating users’ Google Workspace and Cloud Identity passwords with on-premise Active Directory.
Organization Benefits
Google Cloud relies on Google identities to handle authentication and access management. Managing Google identities manually for every employee can lead to unnecessary management overhead. This is especially true when all employees already have Active Directory accounts.
Organizations can simplify identity management. They do this by synchronizing user and group information from Active Directory to Google Workspace. This approach avoids double identity management. With this approach, users can access on-premises and Google Workspace applications using a single identity. In other words, they use Active Directory as the Identity Provider and Authoritative source.
Prerequisites
To synchronize Active Directory user accounts and groups with Google Workspace, ensure you meet the below prerequisites.
- Active directory forest or domain
- Google Cloud Directory Sync Software
- A Google Identity or Google Workspace account
- Public Domain name from the authorized registrar
- An account from Google Workspace with a Super Admin role
- A user account with Domain Admin privileges or read/write access to user accounts synchronize with Google Workspace.
Where to deploy Google Cloud Directory Sync?
GCDS is a tool that helps sync user and group information. This information is stored in an LDAP directory. It is synced to Cloud Identity or Google Workspace. It simply acts as a bridge between the LDAP server and Cloud Identity or Google Workspace. GCDS retrieves the necessary information from the directory. It adds, modifies, or deletes users in your Cloud Identity or Google Workspace account.
Google Cloud Directory Sync can be deployed in an on-premises environment. It can also run on a Compute Engine virtual machine in Google Cloud.
Practical Example
Imagine a company called myforest1 that has a worldwide presence. They have an on-premises Active Directory to offer identity services. The main office is in Seattle. Their Active Directory integrates with an Entra ID Tenant through Entra Connect Sync. All users use Microsoft 365 services, including Teams, email, OneDrive, SharePoint online, etc.
But, as per the business requirements, they would like to onboard a new domain, “frontline.myforest1.com”. This is for frontline workers. It will allow them to use Google Workspace services. These include Gmail, Google Drive, Google Docs, Google Sheets, Google Slides, Google Meet, Google Forms, and more.
But, they decided to continue to use Active Directory as the source of truth for identity management.
In this scenario, an organization can simply deploy the Google Cloud Directly Synchronization (GCDS) tool. It provisions on-premise objects with their existing Google Workspace or Cloud Identity. Then, they can assign Google licenses to achieve their business goals.
The diagram presented below serves to illustrate the scenario that has been alluded to in this particular example.

Implementation steps
I have implemented a Hybrid Active Directory environment utilizing Entra Cloud Sync to show the setup. Recently, I have replaced the last Exchange server with the Exchange Management Tool server in this environment.
This article exclusively discusses the process of synchronizing user accounts and groups that are linked to the domain frontline.myforest1.com.
Before we start, please make sure that you have completed the prerequisites. Follow the steps below to achieve the goal mentioned in the Practical Example section.
Step 1: Create a user account in Google Identity for GCDS and assign a Super Admin Role
- Sign in to https://admin.google.com/ in any web browser
- Navigate to Directory->Users->Click Add new user.
- I have created a user account named gcds.myforest1@frontline.myforest1.com assigned a super Admin role, as shown in the screenshots below


Step 2: Create an Active Directory user for GCDS
A domain user with enough access must allow GCDS to retrieve information about users and groups from the Active Directory. You can use either the GUI or PowerShell method to create an account.
I have created an account name, gcds@forntline.myforest1.com, using the PowerShell method and added it to the Domain Admins group to grant access to administrative privileges.

Step 3: Install Google Cloud Directory Sync software
Next, we must install the Google Cloud Directory Synchronization software to provision on-premise objects with Cloud Identity. You can follow the instructions given below to download and install the GCDS software.
- Run the PowerShell command given below to download the GCDS installer
- (New-Object net.webclient).DownloadFile(“https://dl.google.com/dirsync/dirsync-win64.exe”, “$(pwd)\dirsync-win64.exe”)
- Launch the installation wizard by running the following command
- .\dirsync-win64.exe
In this demonstration, I have installed GCDS software on the domain controller.
Step 4: Create a folder for the GCDS configuration
GCDS stores its configuration in an XML file. Ensure that the folder used for the configuration is properly secured. Because it contains an OAuth refresh token that GCDS uses to authenticate with Google.
Run the PowerShell command given below with Administrative Privileges to create folder,gcds.
$gcdsDataFolder = "$Env:ProgramData\gcds" New-Item -ItemType directory -Path $gcdsDataFolder &icacls "$gcdsDataFolder" /inheritance:r &icacls "$gcdsDataFolder" /grant:r "CREATOR OWNER:(OI)(CI)F" /T &icacls "$gcdsDataFolder" /grant "BUILTIN\Administrators:(OI)(CI)F" /T &icacls "$gcdsDataFolder" /grant "Domain Admins:(OI)(CI)F" /T &icacls "$gcdsDataFolder" /grant "LOCAL SERVICE:(OI)(CI)F" /T

Step 5: Configure Google Directory Cloud Sync
Configuring Google Cloud Directory Sync (GCDS) is necessary. It enables user and group provisioning from the on-premise to Google Workspace. It also works with Cloud Identity.
In this demonstration, we will provision the users and groups linked to the Organizational Unit known as “Frontline Workers.
After this demonstration, you will be capable of understanding how to;
- Connect to Google Identity or Google Workspace from GCDS tool
- Connect to Active Directory Domain from GCDS tool
- Sync user accounts and groups with Google Cloud
- Configure user mappings by email address
- Configure user deletion policy
- Configure group mappings by email address
- Configure group deletion policy
- Configure logging and notifications
- Simulating user provisioning
- Initial (Full Sync) user provisioning
Step 6: Connect to Google Identity or Google Workspace from GCDS Tool
Log in to the domain controller where we installed the GCDS software. Open Configuration Manager. Follow the instructions in the video given below.
Step 7: Connect to Active Directory Domain from GCDS tool
Follow the video instructions to connect to the Active Directory domain. I will use domain admin credentials in the demo. You can use the account gcds that we created earlier.
Step 8: Choose what to synchronize
Select User Accounts and Groups to synchronize with Cloud Identity as illustrated in the below figure.

Step 9 : Configure User mappings by email address
To provision users in Cloud Identity from Active Directory, follow the instructions in the below table or video. You should configure user mappings by email address.
| User Accounts\User Attribute\User Email (Default Value) | First, connect Active Directory with Cloud Identity or Google Workspace. Then, set up how to match user accounts between the two systems. This step depends on whether you want to match user accounts with Email address or UserprincipalName. Throughout Google Cloud, the email address will identify the user. It will also serve as a username to access all Google Cloud applications. That is why we selected the Mail attribute. In our scenario, UPN and Email address are the same. |
| User Accounts\User Attribute\Unique identifier Attribute (Default Value) | Next, we must choose an attribute with a unique attribute value at AD side for all user accounts during Synchronization. This is useful to identify an object when it gets renamed in Active Directory. It also helps to track which Active Directory user corresponds to which user in Cloud Identity. So yes, |
| User Accounts\User Attribute\Alias Address Attributes (Default Value) | Keep the proxyAddresses value because we sometimes need to sync alias addresses with Cloud Identity or Google Workspace. So, there is no change in the default settings in our scenario. |
| User Accounts\Additional User Attributes (Default Value) | Use the default value. |
| User Accounts\SearchRule | Create a Search Rule to specify which users should import and synchronize with Cloud Identity or Google Workspace. Users not in the scope will be deleted or won’t synchronize. (&(objectCategory=person)(objectClass=user)(mail=*)(!(userAccountControl:1.2.840.113556.1.4.803:=2))) Leave the Base DN empty. This rule matches all non-disabled users with a non-empty email address but ignores computer and managed service accounts |
| User Accounts\Exclusion Rules | On the Exclusion Rule, choose the synchronization action if GCDS receives a deletion request that exceeds the configured limits. |
Step 10: Configure user account deletion policy
Please enable the option “Don’t suspend or delete Google domain admins not found in LDAP”. This action prevents the sync Tool from suspending or deleting the super-admin user. You used this user to configure your Cloud Identity or Google Workspace account.

Alternative methods exist to exclude user accounts from the sync scope to Cloud Identity. You can explore Google Documents to learn more more about this.
Step 11: Configure group mappings by email address
After connecting Active Directory with Cloud Identity or Google Workspace, you must configure the group matching. You need to decide how to match groups between the two systems. This step depends on whether you want to match groups using their name or email address.
- To provision security groups, you need to first identify their types and then create an appropriate LDAP query. For syncing all groups with email addresses, the below query that needs to be used.
- (&(objectCategory=group)(mail=*))
- Create a custom rule for groups. It should match email addresses in the Active Directory and Cloud identity. Follow the instructions to accomplish this task.
- In Configuration Manager, navigate to Groups–>Search Rules–>Click Use Defaults to add a couple of default rules.
- Click the first rule edit icon–>Edit Rule to replace the LDAP query–>Click OK
- Remove the second rule.
Step 12: Configure group deletion policy
GCDS manages the removal of groups in a similar way as it does for users. This can be achieved by adding Exclusion rules to the Configuration manager. To find more information, please check Google’s documentation.
Step 13: Configure logging and notifications
Keeping users in sync requires running GCDS on a schedule. You can control GCDS log file settings to monitor activity and issues.You can Specify where to write log file information, the level of detail, and the maximum log file size.
By default, logging will be saved in a user profile.

However, you can change the directory, as shown in the below figure.

Please remember to commit changes by saving the configuration file whenever you make changes.
GCDS can also send email alerts in addition to keeping a record. To turn on this feature, click on Notifications and enter the details of your email server connection.

Step 14: Initial user provisioning
Now, it’s time to kick off the initial synchronization. To do that, navigate to Sync->Click Simulate. This simulates user provisioning based on the configuration. During simulation, GCDS won’t change your Cloud Identity or Google Workspace account. It will report which changes it would perform during a regular provision run.
Triggering user provisioning in your Cloud Identity or Google Workspace account will permanently change users and groups. Consider temporarily changing the LDAP query to match a subset of users for testing. This helps avoid repeatedly modifying or deleting many users during testing. It also prevents abusive behavior.
Conclusion
Google Cloud Directory Sync (GCDS) is a powerful tool. It synchronizes user and group information between your Google Workspace domain and your LDAP server or Active Directory. With GCDS, you can automate the provisioning and de-provisioning of user accounts. It helps maintain group memberships. GCDS ensures that your directory information is up-to-date and accurate. By using GCDS, you can reduce the manual effort needed to manage your directory information. This can help you save time. It also reduces errors and improves your organization’s overall security.
Thank you for taking the time to peruse this article. I trust that the technical details discussed here were easily comprehensible and that this piece will prove to be a valuable resource for your work





Recent Comments