lithnet / resourcemanagement-powershell

Lithnet FIM/MIM Service PowerShell Module
MIT License
37 stars 12 forks source link

Search-Resources -Xpath "/Person[equals query throws fault does not have detail information error #10

Closed darrenjrobinson closed 7 years ago

darrenjrobinson commented 7 years ago

When using Search-Resources -Xpath "/Person[equals I get the following error. Often the query still executes and I get the dataset.

Search-Resources : The fault does not have detail information. At line:2 char:34

Changing equals to starts-with provides the same dataset with no error.

ryannewington commented 7 years ago

@darrenjrobinson any references to a 'fault' indicate a problem happened on the server side. The 'detail' missing from the error report is usually found in the event log of the FIM service that processed the request.

I haven't used the [equals(value, name)] method before. I've always used [name=value]

darrenjrobinson commented 7 years ago

Here is the error from the Event Log. The weird thing is you often get the results. Trialing with Search-Resources -Xpath "/Person[(Domain='DomainName')]" which looks promising.

Requestor: urn:uuid:7fb2b853-24f0-4498-9534-4e10589723c4 Correlation Identifier: e4c42c0f-6790-4de2-a243-14fd8904a627 Microsoft.ResourceManagement.WebServices.Exceptions.UnwillingToPerformException: Other ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary2.get_Item(TKey key) at Microsoft.ResourceManagement.Query.QueryParametersGenerator.WriteSorting() at Microsoft.ResourceManagement.Query.QueryParametersGenerator.BuildParameterString() at Microsoft.ResourceManagement.Query.QueryProcessor.BuildSqlCommand(Query objectRepresentation, Boolean countResultsOnly) at Microsoft.ResourceManagement.Query.QueryProcessor.ExecuteQuery(Query query, Nullable1 maximumTime, Boolean& endOfSequence, Boolean countResultsOnly, Int64& resultCount, Int64& executionTime) at Microsoft.ResourceManagement.WebServices.RequestDispatcher.ExecutePullActionImpl(PullRequestParameter pullParameter) at Microsoft.ResourceManagement.WebServices.RequestDispatcher.ExecuteEnumerateAction(RequestType request) at Microsoft.ResourceManagement.WebServices.RequestDispatcher.ExecuteAction(RequestType request) at Microsoft.ResourceManagement.WebServices.RequestDispatcher.ExecuteAction[ResponseBodyType](RequestType request) at Microsoft.ResourceManagement.WebServices.RequestDispatcher.DispatchRequest[ResponseBodyType](RequestType request, Guid requestIdentifier, Object redispatchSingleInstanceKey, Boolean isRedispatch) at Microsoft.ResourceManagement.WebServices.RequestDispatcher.DispatchRequest[ResponseBodyType](RequestType request) at Microsoft.ResourceManagement.WebServices.ResourceManagementService.Enumerate(Message request) --- End of inner exception stack trace ---

ryannewington commented 7 years ago

the equals() function is not listed in the supported function list for FIM's XPath variant

https://msdn.microsoft.com/en-us/library/windows/desktop/ee652287(v=vs.100).aspx

Weird that it works some times. I'd say either you've hit a FIM bug, or its not supported.