PRB: MAPI Error 80040700 When Making Profile Programmatically

ID: Q193643

The information in this article applies to:

SYMPTOMS

When you make a profile programmatically the call to IMsgServiceAdmin:ConfigureMsgService() may return the following MAPI error message:

   80040700 "MAPI_E_AMBIGUOUS_RECIP"

CAUSE

The values passed to the ConfigureMsgService for the Mailbox Alias or Mailbox Display Name were ambiguous.

WORKAROUND

When the Mailbox Alias or Mailbox Display Name is ambiguous, this call fails. To specify a Mailbox Display Name or Mailbox Alias that is unique but is a sub-string of another Mailbox Display Name or Mailbox Alias, use "=" before the string. Alternately, you can specify the Distinguished Name (Obj-Dist-Name) of the mailbox.

To specify a Mailbox Alias that is Admin when there are also valid mailbox aliases of Admin1 and Admin2 you need to specify the string value as "=Admin" in order for this call to work. For example:

      rgval[0].ulPropTag = PR_PROFILE_UNRESOLVED_NAME;
      rgval[0].Value.lpszA =  "=Admin";

Similarly, to specify a Mailbox Display Name for "Administrator" when there is also a valid Mailbox Display Names of "Administrator One" you would use the "=" as demonstrated here:

      rgval[0].ulPropTag = PR_PROFILE_UNRESOLVED_NAME;
      rgval[0].Value.lpszA =  "=Administrator";

An example of using the Distinguished Name follows:

      rgval[0].ulPropTag = PR_PROFILE_UNRESOLVED_NAME;
      rgval[0].Value.lpszA =  "/o=MyOrg/ou=MySite/cn=Recipients/cn=Admin";

MORE INFORMATION

For sample code demonstrating how to make a profile programmatically, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q170225
   TITLE     : HOWTO: Modifying Settings of MS Exchange Transport Provider

Additional query words: kbMsg KBMAPI100 kbmapi
Technology        : kbMsg kbMAPI
Version           : WINDOWS:1.0,4.0,5.0,5.5
Platform          : WINDOWS
Issue type        : kbprb

Last Reviewed: October 6, 1998