Category: FIM Troubleshooting

  • An error occurred while enumerating the filter ‘/group[DisplayedOwner=’XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX’]’

    Seems to be the week for silly errors. I was working on a custom workflow activity today, where I want to retrieve any group that has a particular DisplayedOwner, but kept getting the following error when the workflow was trying to use the Enumerate Resources Activity to search for a group :

    System.InvalidOperationException: An error occurred while enumerating the filter ‘/group[DisplayedOwner=’XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX’]’. —> Microsoft.ResourceManagement.WorkflowDataExchangeException: System.InvalidOperationException: Schema retrieval failed.

    The issue here is that the Xpath filter is actually case sensitive and “group” is not the same as “Group”, which is what the resource type is actually called. It was a simple matter to create a test set using the filter ‘/group[DisplayedOwner=’XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX’]’.

    What was not so silly, however, is that the ‘group’ value was specified as part of a workflow configuration – the particular WF being executed could take a number of different object types as a configurable parameter in the Workflow Activity configuration. To fix this, all I had to do is change my ‘group’ parameter to ‘Group’… however when I did, it somehow got renamed back to ‘group’ – even if I changed it to something else (successfully) and then back again. In other words, my workflow configuration showed my parameter as ‘Group’, but the error above was still being thrown – but if I changed it to ‘Groupd’, the expected error contained ‘Groupd’

    The only way to actually get it to change to a capital ‘G’ was to change the order on the workflow. It was as if that parameter was cached somehow, so there must be something funny going on with the XOML here.

  • Cannot insert duplicate key row in object ‘fim.ObjectValueReference’ with unique index ‘IX_ObjectValueReference_ObjectKey_AttributeKey-Filtered_Multivalued’.

    I was working on a custom workflow activity today that was using the Update Resource activity to update a multivalue field in an object. Unfortunately, the request was coming up as ‘failed’ and in the Event Viewer, I was seeing the following error:

    Microsoft.ResourceManagement.WebServices.Exceptions.UnwillingToPerformException: Other —> System.Data.SqlClient.SqlException: Reraised Error 50000, Level 14, State 1, Procedure ReRaiseException, Line 37, Message: Reraised Error 50000, Level 14, State 1, Procedure ReRaiseException, Line 37, Message: Reraised Error 2601, Level 14, State 1, Procedure UpdateResource, Line 515, Message: Cannot insert duplicate key row in object ‘fim.ObjectValueReference’ with unique index ‘IX_ObjectValueReference_ObjectKey_AttributeKey-Filtered_Multivalued’. The duplicate key value is (9101, 87654).

    When I investigated the [fim].[UpdateResource] stored procedure and [fim].[ObjectValueReference] in the FIMService database, I could see that 9101 correlated to the object I was trying to update and that 87654 correlated to the multivalue attribute I was trying to update. Next I looked at my code, and it all seemed to be as I expected:

    update parameters insert

     

    Lastly, I looked at my schema.. and sure enough, my attribute wasn’t flagged as multivalue – somewhere in re-creating my schema, I’d forgotten to check that box. Deleting and re-creating the attribute and its binding resolved my issue, as well as another issue I had when I was trying to read the attribute back – because clearly you can’t read a list of UniqueIdentifiers from a single-value attribute.

    Silly mistake, so why do I share it here? Because someone out there may Google this error one day, and this might help them.

  • CustomizedObjects.aspx: Unable to process your request

    Having recently performed a FIM 2010 R2 SP1 Upgrade, I was then required to apply some changes made in an earlier release using the FIM 2010 Migration scripts. In hindsight, I probably should have done this in reverse order (apply changes, then upgrade), as the changes.xml file contained a bunch of deletions related to specific R2 SP1 functionality. Anyway, I cleaned up the XML, ensuring it contained only changes relevant to the development work, but after deploying, I was receiving this error when trying to access  ~/identitymanagement/aspx/customized/CustomizedObjects.aspx?type=CustomType&display=CustomType from my FIM Navigation Bar:

    Customized Objects Error

    Interestingly, this error only seemed to present for one type of custom resource type – I had one which worked fine, and one which did not. After checking all the MPR permissions around my custom object type, I went into Administration->All Resources and tried to view the resources through there. Same error presented. Not surprising, since I think this page uses CustomizedObjects.aspx also, but this made it obvious that there was something else going on here. I could even create a test custom object and CustomizedObjects.aspx worked fine for it.

    The surprising part, to me, was that nothing of use was showing in Event Viewer – just an error saying something was wrong – and even when I enabled verbose logging, nothing turned up. Finally, I went into Administration->Schema Management and compared my initial two custom resource types. I noticed pretty quickly that there was some vital  schema elements missing from my resource type that wasn’t working:

    • Created Time
    • Creator
    • Deleted Time
    • Description
    • Detected Rules
    • Display Name
    • Expected Rules
    • Expiration Time
    • Locale
    • MV Resource ID
    • Resource Time
    • Resource Type

    Now, looking at the attributes missing, it’s pretty obvious why CustomizedObjects.aspx wasn’t working for my custom resource type – these are the base attributes used by the system! The only thing that I can imagine happened is that when I was modifying changes.xml for my schema, I must have removed any references to these attributes by accident… though looking back, I don’t recall modifying the schema changes much at all.

    Regardless, once I added these attribute bindings back in through Schema Managemet, my CustomizedObjects.aspx started working again and my issue was resolved. This is a pretty obscure one, so I doubt anyone will encounter it in the future, but listing it here just in case.