Hosted Email 2007 Import::ImportMailbox will mess up your CustomerAssets table?

For those who are doing the migration from HMC 3.5 to HMC 4.0 using the HMC 4.0 Migration Kit, you may want to take note of this.

 

One of the tasks executed by the Hosted Email 2007 Import::ImportMailbox procedure is creating the mailbox GUID asset for each mailbox that you are importing into the CustomerAssets table in PlanManager database. The tasks is as follow (extracted from the Hosted Email 2007 Import::ImportMailbox procedure),

 

....

....

....

<execute namespace="Managed Plans" procedure="CreateCustomerAsset" impersonate="1">

                <executeData>

                <eventTypeName>AssetAdded</eventTypeName>

                                <statusTypeName>Enabled</statusTypeName>

                                <assetTypeName>ExchMailboxGUID</assetTypeName>

                </executeData>

                <before source="procedureData" sourcePath="owningOrganization" destination="executeData" destinationPath="path" mode="merge"/>

                <before source="procedureData" sourcePath="msExchMailboxGUID" destination="executeData" destinationPath="asset" mode="merge"/>

                <before source="data" sourcePath="preferredDomainController" destination="executeData"/>

</execute>

....

....

....

 

This is importing of mailbox, however take note of the highlighted above. The path provided is supposed to be the user, but instead the owningOrganization is provided. As a result, when you use this procedure to perform the import, instead of mapping each user GUID to the appropriate mailbox GUID in the asset table, you are mapping all the mailbox GUID for that organization to the organization GUID.

 

The good news is that the above does not affect the service by the user but it may create some reporting issues and of course incorrect entries in the database. Nobody likes that.

 

So, if you haven't done the import, my suggestion is to change the highlighted portion above to the following so that the creation of the customer asset will pick up the LDAP path of the user instead of the LDAP path of the owningOrganization.

 

<before source="data" sourcePath="user" destination="executeData" destinationPath="path" mode="merge"/>

 

Please take note that the above steps will update the namespace procedure directly. This is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of Use. Please test it thoroughly.

So, what about for those who did the import in the past and you have used the Hosted Email 2007 Import::ImportMailbox procedure for that. Fortunately, while you will have to do some database brain surgery to fix it, it isn't difficult. What you need to do is to find all the mailbox enable user objects and retrieve the msExchMailboxGUID attribute and match it with the Asset field in the CustomerAsset Table. If they match, then update the CustomerID field.