Custom Web Service - The (&(objectClass=user)(mail=)) search filter is invalid.

I have inherited a SharePoint farm where a previous developer created a web service/solution that connected to AD, got the person's email account and then used that to connect to another database that holds our HR data.  Over the weekend, some patching was done on the server and a reboot and now this service doesn't seem to work in InfoPath (where it prepopulates some user data).  Below is the error that I am getting when looking at a Preview of the form.

I am not a developer so I am not understanding what is causing this issue.  I have asked my server techs to advise what was done during the patching, but in the meantime, I thought I'd see if anybody could shed any light on the error below?

The SOAP response indicates that an error occurred on the server:

The (&(objectClass=user)(mail=)) search filter is invalid.
<detail><ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HelpLink i:nil="true"/><InnerException i:nil="true"/><Message>The (&amp;(objectClass=user)(mail=)) search filter is invalid.</Message><StackTrace>   at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.MoveNext()
   at System.DirectoryServices.DirectorySearcher.FindOne()
   at SP.HR.EmployeeService.getUserADInfo(String filterCriteria)
  at SP.HR.EmployeeService.GetEmployeeByEmail(String email)
   at SyncInvokeGetEmployeeByEmail(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace><Type>System.ArgumentException</Type></ExceptionDetail></detail>

July 28th, 2015 1:05am

Hi,

Are you calling the service from your code? As I can apparantly see in the error message the filter doesn't have mail address onlly 'mail=' whereas it should be 'mail=useremail@domain.com'

Is it happening for a single user or for all users? Maybe the user you are trying doesn't have email address set?

Free Windows Admin Tool Kit Click here and download it now
July 29th, 2015 3:01am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics