FIM/MIM Troubleshooting: ExternalEmailAddress Is Mandatory on MailUser. Property Name: ExternalEmailAddress

Background

An issue where we were receiving a ma-extension-error during export

In reviewing the Application Event Log, I found the below information concerning the exported object.

The piece of the event log that I was most interested in was the ERROR: ExternalEmailAddress is mandatory on MailUser. Property Name: ExternalEmailAddress. 

The error is generated through Update-Recipient PowerShell CmdLet. 

If the “Provisioning for” is set to either “Exchange 2007” or “Exchange 2010” then the Update-Recipient PowerShell CmdLet is called.  The error indicates that we are missing information necessary to create an Exchange MailUser or Mailbox Enabled User object. 

Scenarios

In this issue that I was working, we actually had two different scenarios. 

Scenario #1: Create an Exchange 2010 Mailbox-Enabled User for department = mydepartment

We were using the ExchangeUtils.CreateMailbox (see the MSDN Library page) method to create the Exchange 2010 Mailbox-Enabled User.  We discovered by reading the “Exchange 2010 and msExchHomeServerName” section of the “Exchange Provisioning using ILM 2007 and FIM 2010” TechNet article that  we to add msExchHomeServerName attribute to be able to create an Exchange 2010 Mailbox-Enabled User.  Once we added this to our code, we were able to create the Exchange 2010 Mailbox-Enabled User. 

Scenario #2: Create just an Active Directory User Object for department = nothing

Working on this second scenario, we found that we were setting the metaverse accountName attribute to the mailNickName attribute during Export Attribute Flow.  Setting just the mailNickName attribute on a non-mailbox enabled user object or a mail-enabled user object causes the PowerShell script Update-Recipient to get fired.  We were able to resolve the issue by removing the mailNickName attribute flow.  Since we were setting mailNickName in our Provisioning code, removing the mailNickName attribute from attribute flow did not cause us problems with Scenario #1.       

APPLICATION EVENT LOG

The description for Event ID 0 from source FIMSynchronizationService cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

There is an error in Exch2010Extension AfterExportEntryToCd() function when exporting an object with DN CN=user, OU=myou,DC=mydomain,DC=local.

Type: Microsoft.MetadirectoryServices.ExtensionException

Message:

**** ERROR ****

ExternalEmailAddress is mandatory on MailUser. Property Name: ExternalEmailAddress

**** END ERROR ****

**** ERROR ****

The mail contact and mail user must have a valid external e-mail address. Property Name: ExternalEmailAddress

**** END ERROR ****

**** ERROR ****

The mail contact and mail user must have a valid external e-mail address. Property Name: ExternalEmailAddress

**** END ERROR ****

Stack Trace:    at Exch2010Extension.Exch2010ExtensionClass.AfterExportEntryToCd(Byte[] origAnchor, String origDN, String origDeltaEntryXml, Byte[] newAnchor, String newDN, String failedDeltaEntryXml, String errorMessage)

Additional Information