none
ResourceID in set members Manager attribute

    Question

  • Hi

    I wan't to create a set of all managers. I have a set of all active users and all users have the manager attribute populated.

    This xPath defines users in the set of all active users.
    /Person[ObjectID = /Set[ObjectID = '45b73b9c-3f1f-40b1-af9b-feb320f63e96']/ComputedMember]

    what i really want is the managers of all theese active users. But just adding "/Manager" like below off course does not work.

    /Person[ObjectID = /Set[ObjectID = '45b73b9c-3f1f-40b1-af9b-feb320f63e96']/ComputedMember/Manager]


    Bright ideas?


    /Frederik Leed

    Friday, June 21, 2013 8:43 AM

All replies

  • You were close,

    /Person[ObjectID =  /Set[ObjectID = '45b73b9c-3f1f-40b1-af9b-feb320f63e96']/ComputedMember]/Manager

    If you think of the pathing, you want the root element (Person)'s Manager attribute from all people who belong to the All Active Users set.

    Friday, June 21, 2013 2:35 PM
  • FYI - FIM Sets have XPath restrictions, covered in this document:

    http://technet.microsoft.com/en-us/library/ff356871(WS.10).aspx      

    Here is a relevant snippet:

    "

    Multiple location steps are not supported, except when referencing the membership of a set. The following filter is unsupported in sets:  /Person/Manager.

    The following filter is supported, because the multiple levels of dereferencing is to reference the membership of a set:  /Person[Manager = /Set[ObjectID = ‘7CF6B5A3-01B2-45d3-8337-5EB521DDA08D’]/ComputedMember]

    "


    CraigMartin – Edgile, Inc. – http://identitytrench.com

    Friday, June 21, 2013 4:47 PM
  • You were close,

    /Person[ObjectID =  /Set[ObjectID = '45b73b9c-3f1f-40b1-af9b-feb320f63e96']/ComputedMember]/Manager

    If you think of the pathing, you want the root element (Person)'s Manager attribute from all people who belong to the All Active Users set.

    Thx a lot for this, seemed like at quick fix :) The UI just does not accept it :/ -"Failed to process the request: UnknownError" :)

    I used: /Person[ObjectID = /Set[ObjectID = '45b73b9c-3f1f-40b1-af9b-feb320f63e96']/ComputedMember]/Manager

    From eventlog:

    System.InvalidOperationException: Operation is not valid due to the current state of the object.

    --
    Log Name:      Forefront Identity Manager
    Source:        Microsoft.ResourceManagement
    Date:          25-06-2013 20:57:46
    Event ID:      3
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:     
    Description:
    Requestor: urn:uuid:557713c4-e700-4789-8e13-50743d95b143
    Microsoft.ResourceManagement.Service: System.InvalidOperationException: Operation is not valid due to the current state of the object.
       at Microsoft.ResourceManagement.FilterEvaluation.Language.MembershipCondition.Create(QueryFilter queryFilter, Int32[]& membershipConditions)
       at Microsoft.ResourceManagement.ActionProcessor.FilteredResourceActionProcessor.FilteredResourceActionProcessHelper.DoPreProcessRequest(RequestType request)
       at Microsoft.ResourceManagement.ActionProcessor.FilteredResourceActionProcessor.PreProcessRequestFromAttribute(RequestType request)
       at Microsoft.ResourceManagement.ActionProcessor.ActionDispatcher.PreProcessRequestFromAttribute(RequestType request)
       at Microsoft.ResourceManagement.WebServices.RequestDispatcher.CreateRequest(CreateRequestDispatchParameter dispatchParameter)
       at Microsoft.ResourceManagement.WebServices.RequestDispatcher.CreateRequest(UniqueIdentifier requestor, UniqueIdentifier targetIdentifier, OperationType operation, String businessJustification, List`1 requestParameters, CultureInfo locale, Boolean isChildRequest, Guid cause, Boolean doEvaluation, Nullable`1 serviceId, Nullable`1 servicePartitionId, Boolean maintenanceMode, String synchronizationSequenceIdentifier)
       at Microsoft.ResourceManagement.WebServices.RequestDispatcher.CreateRequest(UniqueIdentifier requestor, UniqueIdentifier targetIdentifier, OperationType operation, String businessJustification, List`1 requestParameters, CultureInfo locale, Boolean isChildRequest, Guid cause, Boolean doEvaluation, String synchronizationSequenceIdentifier)
       at Microsoft.ResourceManagement.WebServices.ResourceManagementService.Put(Message request)


    /Frederik Leed

    Tuesday, June 25, 2013 6:59 PM
  • Did that work?  Based on the XPath limitations in Set criteria I would expect it to fail because of the multiple location steps.  Love to be wrong when being right means less functionality ;-)

    CraigMartin – Edgile, Inc. – http://identitytrench.com

    Tuesday, June 25, 2013 7:15 PM
  • Just like what Craig said, it's most likely not supported as a filter in defining a Set.

    In my past experience, I have run across some XPath filters that can be used in Sets but not rendered properly by the UI, and XPath filters that are flat out rejected for use by Sets, but still can used from Workflow/Web service clients.

    In my testing the query *seems* to work for a web client request, but will not as a definition for a Set.

    Tuesday, June 25, 2013 7:34 PM