HrGetServerDN fails with MAPI_E_CALL_FAILED (0x80004005)

In Exchange 2013 Cumulative Update 3, Exchange stopped stamping the property HomeMTA on the user object in Active Directory. As a result PR_EMS_AB_HOME_MTA_A, a property that HrGetServerDN() depends on no longer works.  HrGetServerDN() is a function from the Exchange Development Kit (EDK) for Exchange 5.5.  It is not supported or recommended for any version of Exchange except Exchange 5.5.  You can still get the full source for the EDK if you know who to ask.

To work around this issue use an alternate mechanism to achieve your goal of getting the ServerDN for a particular user.  The recommend approach is to use the Plain Old XML (POX) Autodiscover and pull the necessary information in that way. If you are using Exchange 2013 you should be using the POX Autodicover anyway to retrieve data about the user to build a profile.

More Information