0
Completed

Better error message when fields are of the wrong type

Matthew Clark 13 years ago in UNIFYBroker/Microsoft Identity Manager updated by anonymous 8 years ago 5

When attempting to export users to MOSS, the AccountName attribute was assigned from an incorrect field, rather than a string containing the DN as assigned by the provisioning logic. A more useful error message could be returned in this case, stating that the DN is of the incorrect type.

For reference, here was the error message provided:

The extensible extension returned an unsupported error in MIIS.
The stack trace is:

"System.ArgumentException: dnComponentString
at Unify.Framework.DistinguishedNameComponent.CreateDNComponent(String dnComponentString)
at Unify.Framework.ReferenceValueToDistinguishedNameValueAdapter.Transform(ReferenceValue sourceValue)
at Unify.Framework.ChainValueAdapter`3.Transform(TBaseValue baseValue)
at ... "

Issue moved to the FIM adapter project. Investigation revealed that the breaking conversion is in the FIM adapter, and that this would be the most suitable place to catch and handle a more useful error.

The error message should include the field name, as well as the expected type. This should carry over for other types of fields, not just distinguished names.

Full stack trace as an example:

System.ArgumentException: dnComponentString
   at Unify.Framework.DistinguishedNameComponent.CreateDNComponent(String dnComponentString)
   at Unify.Framework.DistinguishedNameConversionFromString.CreateDistinguishedName()
   at Unify.Framework.DistinguishedNameValue.op_Implicit(String instance)
   at Unify.Framework.IdentityBrokerManagementAgentProxy.ConvertCSEntryAttribute(CSEntry csentry, String attributeName)
   at Unify.Framework.IdentityBrokerManagementAgentProxy.ConvertCSEntryToAdapterEntity(CSEntry csentry)
   at Unify.Framework.IdentityBrokerManagementAgentProxy.ExportEntry(ModificationType modificationType, String[] changedAttributes, CSEntry csentry)
   at Unify.Framework.IdentityBrokerManagementAgent.ExportEntry(ModificationType modificationType, String[] changedAttributes, CSEntry csentry)

Issue resolved and closed. This has been dealt with by the use of LDIF during the export process (hence no local conversion takes place), leaving validation messages up to the Identity Broker service.