We're trying to push a Civi contact's data into an LDAP data store using the Civi Drupal entity module and the Drupal ldap module. That part works fine. If a user updates their contact card using a Civi user profile form, the changes are immediately pushed into ldap.
But when we update the same contact using the Rest API, the changes are not synced into ldap and we dont know why. (The REST API call does successfully update the civi contact card however.) We suspect its because some specific Drupal function is not being called and are wondering if it is a bug. The closest I have been able to find is
hook_user_update. Reading the documentation, we believe it isn't called by the Rest API but is called by Civi Profile form. We're not sure about this.
What can we do to ensure that the Civi entity module successfully updates our LDAP store when called using the REST interface?