Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: MAPI Error 80040700 When Making Profile Programmatically


View products that 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"

↑ Back to the top


Cause

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

↑ Back to the top


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";
				

↑ Back to the top


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

↑ Back to the top


Article Info
Article ID : 193643
Revision : 4
Created on : 1/1/0001
Published on : 1/1/0001
Exists online : False
Views : 618