The goal of this document is to provide an explanation of the problem, and to provide steps on how to modify the GalSync source code to correct the problem.
Executing a Delta Synchronization, we receive several “Extension-DLL-Exception” synchronization errors. The review of the Synchronization Error displays that we are working with the msExchMasterAccountHistory data source attribute. The review of the stack trace, we discover more information. The stack trace displays the message “Attribute does not have exactly one value.”
Stack Trace
Extension File Name: GALSync.dll Extension Type: export-flow Extension Context: msExchMasterAccountHistoryMappingForwards System.InvalidOperationException: attribute does not have exactly one value at Microsoft.MetadirectoryServices.Impl.AttributeImpl.get_Value() at Microsoft.MetadirectoryServices.GALSync.MASynchronizer.EAFmsExchMasterAccountHistoryForwards(CSEntry& csentry, MVEntry& mventry) at Microsoft.MetadirectoryServices.GALSync.MASynchronizer.MapAttributesForExport(String FlowRuleName, MVEntry mventry, CSEntry csentry)
The cause of the extension-dll-exception is a line of code within the Private Sub Routine "EAFmsExchMasterAccountHistoryForwards" in the GalSync source code. The line of code is working with the msExchMasterAccountHistory and SIDHistory as single value attributes. Here is the line of code:
csentry(MASTER_ACCOUNT_HISTORY).Value = mventry(SID_HISTORY).Value
This line of code does occur in a couple different places within this sub routine. You will find this line of code one time for the Group Object, and once for the Person Object.
In order to fix the “extension-dll-exception” we will need to modify the GalSync solution that is provided with the installation of the Microsoft Identity Lifecycle Manager 2007 Feature Pack 1 product. Specifically, we will need to modify the "EAFmsExchMasterAccountHistoryForwards" Sub Routine.
To resolve the issue, you perform the following steps:
To change the name of the GalSync Solution to a unique name, perform the following steps:
To apply the code modifications, perform the following steps:
Dim SIDHistoryEntry As Value For Each SIDHistoryEntry In mventry(SID_HISTORY).Values csentry(MASTER_ACCOUNT_HISTORY).Values.Add(SIDHistoryEntry) Next
To update the Identity Manager:
For each affected management agent, perform the following steps:
This section lists the original and the updated source code.
Private Sub EAFmsExchMasterAccountHistoryForwards(ByRef csentry As CSEntry, ByRef mventry As MVEntry) ' Variables Dim uac As Long ' Clear master account history csentry.Item(MASTER_ACCOUNT_HISTORY).Delete() ' Handle groups ' Only security mv group object result in stamping of resulting contact when dealing with GROUPS Dim MAConfig As GALMA = FindMA(csentry) Dim isTrustEnabled As Boolean = MAConfig.XFDelegation If isTrustEnabled AndAlso mventry(SID_HISTORY).IsPresent AndAlso mventry.ObjectType.Equals(GROUP) Then Dim isSecurityGroup As Boolean = (mventry.Item(DISTRIBUTION_GROUP_TYPE).Value And SECURITY_GROUP_TYPE_CODE) = SECURITY_GROUP_TYPE_CODE If isSecurityGroup AndAlso mventry.Item(MAIL_NICKNAME).IsPresent Then csentry(MASTER_ACCOUNT_HISTORY).Value = mventry(SID_HISTORY).Value End If End If If isTrustEnabled AndAlso mventry.ObjectType.Equals(PERSON) AndAlso mventry(USER_ACCOUNT_CONTROL).IsPresent Then ' Get enabled user, flow SID hositry to Master Account history uac = mventry(USER_ACCOUNT_CONTROL).IntegerValue If ((uac And UAC_USER_ACCOUNT) > 0) AndAlso Not mventry(MASTER_ACCOUNT_SID).IsPresent Then If mventry.Item(SID_HISTORY).IsPresent Then csentry(MASTER_ACCOUNT_HISTORY).Value = mventry(SID_HISTORY).Value End If ' If disabled user and MasterAccountSID is not set to SELFSID, flow MasterAccountSid to master account history ElseIf ((uac And MyBase.UAC_DISABLED_USER) > 0) Then If mventry(MASTER_ACCOUNT_SID).IsPresent AndAlso mventry(MASTER_ACCOUNT_SID).Value <> SELFSID Then csentry(MASTER_ACCOUNT_HISTORY).Value = mventry(MASTER_ACCOUNT_SID).Value End If End If End If End Sub
Private Sub EAFmsExchMasterAccountHistoryForwards(ByRef csentry As CSEntry, ByRef mventry As MVEntry) ' Variables Dim uac As Long ' Clear master account history csentry.Item(MASTER_ACCOUNT_HISTORY).Delete() ' Handle groups ' Only security mv group object result in stamping of resulting contact when dealing with GROUPS Dim MAConfig As GALMA = FindMA(csentry) Dim isTrustEnabled As Boolean = MAConfig.XFDelegation If isTrustEnabled AndAlso mventry(SID_HISTORY).IsPresent AndAlso mventry.ObjectType.Equals(GROUP) Then Dim isSecurityGroup As Boolean = (mventry.Item(DISTRIBUTION_GROUP_TYPE).Value And SECURITY_GROUP_TYPE_CODE) = SECURITY_GROUP_TYPE_CODE If isSecurityGroup AndAlso mventry.Item(MAIL_NICKNAME).IsPresent Then ‘ csentry(MASTER_ACCOUNT_HISTORY).Value = mventry(SID_HISTORY).Value Dim SIDHistoryEntry As Value For Each SIDHistoryEntry In mventry(SID_HISTORY).Values csentry(MASTER_ACCOUNT_HISTORY).Values.Add(SIDHistoryEntry) Next End If End If If isTrustEnabled AndAlso mventry.ObjectType.Equals(PERSON) AndAlso mventry(USER_ACCOUNT_CONTROL).IsPresent Then ' Get enabled user, flow SID hositry to Master Account history uac = mventry(USER_ACCOUNT_CONTROL).IntegerValue If ((uac And UAC_USER_ACCOUNT) > 0) AndAlso Not mventry(MASTER_ACCOUNT_SID).IsPresent Then If mventry.Item(SID_HISTORY).IsPresent Then ‘ csentry(MASTER_ACCOUNT_HISTORY).Value = mventry(SID_HISTORY).Value Dim SIDHistoryEntry As Value For Each SIDHistoryEntry In mventry(SID_HISTORY).Values csentry(MASTER_ACCOUNT_HISTORY).Values.Add(SIDHistoryEntry) Next End If ' If disabled user and MasterAccountSID is not set to SELFSID, flow MasterAccountSid to master account history ElseIf ((uac And MyBase.UAC_DISABLED_USER) > 0) Then If mventry(MASTER_ACCOUNT_SID).IsPresent AndAlso mventry(MASTER_ACCOUNT_SID).Value <> SELFSID Then csentry(MASTER_ACCOUNT_HISTORY).Value = mventry(MASTER_ACCOUNT_SID).Value End If End If End If End Sub
Tim Macaulay edited Revision 8. Comment: added the fim path for where GalSync Source Code is located
Ed Price - MSFT edited Revision 5. Comment: TOC
Ed Price MSFT edited Revision 2. Comment: Updated title to standards.
This happens in FIM 2010 as well. Why is this not fixed at the vendor level? I have no intention of compiling code to get the base product to work. What are my options?