Microsoft Entra Management Agent hangs during Full Import or Delta Import with error: System.Collections.Generic.KeyNotFoundException
This article provides a resolution to an issue in which the Microsoft Entra Management Agent stops responding with error System.Collections.Generic.KeyNotFoundException.
Original product version: Active Directory
Original KB number: 3096482
Symptoms
When you run a Full Import or a Delta Import on the Microsoft Entra Connector, one of the following actions occur:
The following error is logged in the Application log:
FIMSynchronizationService Event 6801 The extensible extension returned an unsupported error. The stack trace is: "System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at System.Collections.ObjectModel.KeyedCollection`2.get_Item(TKey key) at Microsoft.Azure.ActiveDirectory.Connector.Connector.GetConnectorSpaceEntryChange(SyncObject syncObject) at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext() at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection) at Microsoft.Azure.ActiveDirectory.Connector.Connector.GetImportEntriesCore() at Microsoft.Azure.ActiveDirectory.Connector.Connector.GetImportEntries(GetImportEntriesRunStep getImportEntriesRunStep)
You receive the following error message:
DirectorySynchronization Event 109: Failure while importing entries from Windows Azure Active Directory. Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at System.Collections.ObjectModel.KeyedCollection`2.get_Item(TKey key) at Microsoft.Azure.ActiveDirectory.Connector.Connector.GetConnectorSpaceEntryChange(SyncObject syncObject) at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext() at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection) at Microsoft.Azure.ActiveDirectory.Connector.Connector.GetImportEntriesCore() at Microsoft.Azure.ActiveDirectory.Connector.Connector.GetImportEntries(GetImportEntriesRunStep getImportEntriesRunStep).
Resolution
To resolve this problem, select the missing object type (device). To do this, follow these steps:
Open Management Agent for the Microsoft Entra directory in the Forefront Identity Manager (FIM) Sync console.
Click Connectors, and then click Microsoft Entra ID.
In the Actions pane, click Properties.
Note
The Properties window opens.
Under Connector Design, click Select Object Types.
In the Select Object Types pane, locate and then select the device check box.
Click OK three times.
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Contact us for help
If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for