Share via


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

Comments

  • Anonymous
    July 31, 2015
    Hi Dave, Pls suggest some method to get this property by MAPI as our code is fully depended on this. One way workaround is to  just put the "PR_EMS_AB_HOME_MTA_A" value in the active directory. But, it is little bit difficult.. thanks

  • Anonymous
    August 05, 2015
    Hello Ranjeetk, The article outlines the recommended way to achieve this. Use Autodiscover rather than using this property. :) I neglected to point out in the article that newly provisioned users (users created after CU3) won't get this property stamped and this property may not be kept up to date.  Therefore, using this property is really not a best practice because it may contain stale data or no data at all.