DirWiz Logo

Article Tags

Create additional proxyaddresses at Sync time

2019-01-08 09:31:42
Active Directory Custom Mapping Exchange 20xx Javascript UnitySync 

Syncing to an Active Directory (AD) Destination, the default mapping for proxyaddresses (shown below) will sync all Source SMTP/smtp addresses. The corresponding contact created on the Destination will contain all these same addresses. This default is usually all that is needed for a typical directory sync.


Occasionally, there might be the need to add an additional single smtp address on the Destination contact.

  • Leave the default mapping in place.
  • Add the below mapping. This will take the primary smtpname and append the domain name specified to add a single smtp address.


Rarely, there may be a need to add another smtp address (with the same domain) based on ALL Source smtp addresses. This is possible via a custom mapping that calls an eval.js javascript sub routine.

Example Scenario:

Source values are:

  • proxyaddresses: SMTP:maryjanemmm@domain.com
  • proxyaddresses: smtp:maryjanesmith@other.com

Desired Destination values are:

  • proxyaddresses: SMTP:maryjanemmm@domain.com
  • proxyaddresses: smtp:maryjanesmith@other.com
  • proxyaddresses: smtp:maryjanemmm@TheNewDomain.com
  • proxyaddresses: smtp:maryjanesmith@TheNewDomain.com

NOTE: The first two sync directly from the Source, while the second two are created at sync time from the Source values and the desired domain.

The solution for this includes a custom mapping which calls a javascript function:

  1. In a custom object map file, leave the default mapping as-is
  2. Add a new line with this additional mapping for proxyaddresses:


  3. Per this article, edit the eval.js file to add this sub routine:

    function grabproxy(proxies)  
    names = proxies.split("@");  
    return names[0];  
Share this article: LinkedIn Twitter reddit