Contacts Sync

projectproject

ABOUT THE PROJECT

For this project we needed to setup both SimpleSAML for SSO using ADFS as the Identity Provider as well as creating a method to synchronize all Active Directory contacts into their own content type. Since users would only have their AD data synchronized on user login we needed to create a more reliable method to keep information updated in Drupal.

In order to accomplish this, we wrote a script that would connect to LDAP through our VPN tunnel. The script synchronized only active users and migrated in all required properties such as Office, Unit, Phone Number, Fax, Address, Job Title, Location and various other data attributes. Everything was bundled into a single batch script which ran on an Acquia Platform Scheduled Task for nightly executions, which it would then generate a JSON file into a private folder location.

The next part of the puzzle was creating a custom migration script that could consume all of that data and update our contacts entities. Since the contacts content type can also contain other properties besides those in Active Directory, we needed to generate our migration using a "--sync" flag in addition to also using override properties to avoid clearing out certain fields. This flag would delete users that were removed from Active Directory, making for one less thing content updaters would need to maintain.

On occasion data attributes in Active Directory might be different than those needed to be displayed, such as a users Phone Number. In order to solve this, we wrote a custom MigrateEntityRevision derivative which would look if an "Override" field is checked. This allowed content updaters to check an override field near a property on the contacts form and choose if it should be synced or manually maintained.

FEATURES

  • Custom LDAP script to query Active Directory properties for each active user
  • Custom Contacts Migration to synchronize over 10,000 users and their properties to contact content type
  • Utilized CER module for bi-directional relationship to Contacts content type and user
  • Custom batch script using Acquia Platform Scheduled Tasks
  • SimpleSAML SSO via ADFS
  • Permission mapping through AD user groups

MADE FOR

Web Team