Summary
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.
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors (upstream author metadata: kaushika-msft). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
