0
Fixed

"Sequence contains no elements" trying to retrieve schema

Matthew Woolnough 7 years ago in UNIFYBroker/Microsoft Identity Manager updated by Adrian Corston 3 years ago 6

Trying to retrieve schema in MIM & getting the error below in event logs. MIM UI displays error Unable to retrieve schema. Error: Exception from HRESULT: 0x80231343

Log Name:      Application
Source:        FIMSynchronizationService
Date:          25/05/2017 3:35:21 PM
Event ID:      6801
Task Category: Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      dc1devfim01.dev.apra.gov.au
Description:
The extensible extension returned an unsupported error.
 The stack trace is:
 
 "System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   at RegExExtensions.RegExExtensions.Extract(String text, String pattern)
   at Unify.Product.IdentityBroker.LdapAttributeDefinition..ctor(String definition)
   at Unify.Product.IdentityBroker.LdapSchema.<>c.<.ctor>b__0_0(String attr)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at Unify.Product.IdentityBroker.LdapSchema..ctor(SearchResultEntry entry)
   at Unify.Product.IdentityBroker.LdapConnection.GetSchema(String schemaDn)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.Aggregate[TSource](IEnumerable`1 source, Func`3 func)
   at Unify.Product.IdentityBroker.LdapConnectionProxy.get_Schema()
   at Unify.Product.IdentityBroker.UnifyLdapConnectorTypeProxy.GetSchema(KeyedCollection`2 configParameters)
Forefront Identity Manager 4.4.1459.0"

Answer

Answer
Fixed

Fix added for 5.3

Under review

Hi Matt,

It sounds like it's failing to interpret the schema definition. I'm attaching Unify.IdentityBroker.FIMAdapter.dll which improves the error reporting for this. Could you please drop this in and re-attempt the schema retrieval.

Error in Event logs:

Log Name:      Application
Source:        FIMSynchronizationService
Date:          25/05/2017 5:47:00 PM
Event ID:      6801
Task Category: Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      dc1devfim01.dev.apra.gov.au
Description:
The extensible extension returned an unsupported error.
 The stack trace is:
 
 "System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   at RegExExtensions.RegExExtensions.Extract(String text, String pattern)
   at Unify.Product.IdentityBroker.LdapAttributeDefinition..ctor(String definition)
   at Unify.Product.IdentityBroker.LdapSchema.<>c.<.ctor>b__0_0(String attr)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at Unify.Product.IdentityBroker.LdapSchema..ctor(SearchResultEntry entry)
   at Unify.Product.IdentityBroker.LdapConnection.GetSchema(String schemaDn)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.Aggregate[TSource](IEnumerable`1 source, Func`3 func)
   at Unify.Product.IdentityBroker.LdapConnectionProxy.get_LdapSchema()
   at Unify.Product.IdentityBroker.LdapConnectionProxy.get_Schema()
   at Unify.Product.IdentityBroker.UnifyLdapConnectorTypeProxy.GetSchema(KeyedCollection`2 configParameters)
   at Unify.Product.IdentityBroker.UnifyLdapConnector.GetSchema(KeyedCollection`2 configParameters)
Forefront Identity Manager 4.4.1459.0"

Planned

The issue is that Identity Broker is incorrectly responding with the schema for a disabled adapter which does not have an LDAP-compliant schema. For now, please ensure that all adapters, including disabled adapters, have LDAP-compliant schema by visiting the corresponding adapter details page and clicking the link in the warning to automatically generate a Rename transformation.

A fix to ensure that Identity Broker doesn't report the schema for disabled adapters will be included in future releases.

+1

Fixing the non-compliant schema of the disabled adapter resolved the issue.

I've seen this error at various other times, always relating to adapter schemas that have field names which are invalid in LDAP, or attempts to join connectors with no field names configured.  Always fix the adapter/connector schema as a first step towards getting rid of this error.