PRB: MAPI Error 80040700 When Making Profile Programmatically (193643)



The information in this article applies to:

  • Microsoft Extended Messaging Application Programming Interface (MAPI)
  • Microsoft Exchange Server 4.0
  • Microsoft Exchange Server 5.0
  • Microsoft Exchange Server 5.5

This article was previously published under Q193643

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

With Exchange Server version 5.5 SP3 or earlier, you can specify a Mailbox Display Name or Mailbox Alias that is unique but is a substring of another Mailbox Display Name or Mailbox Alias by using "=" 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:

170225 HOWTO: Modifying Settings of MS Exchange Transport Provider


Modification Type:MinorLast Reviewed:8/25/2005
Keywords:kbcode kbprb KB193643