0

The query cannot be run for the following DataObject: GetUserProfileByName InfoPath cannot run the specified query. The SOAP response indicates that an error has occurred:

A user with the account name camel\username could not be found. An error was encountered while retrieving the user profile.

On the InfoPath 2010 preview or in the published site SharePoint 2010 has the same error.

Infopath security level is set to domain but still the same error.

SOAP address is http://qaserver:8000/_vti_bin/UserProfileService.asmx

  • is your SharePoint web application using Claim based authentication? – Zakir HC May 30 '16 at 6:18
  • I have windows authentication. till now, the problem still exist. – jaylisto Jun 8 '16 at 1:57
1

InfoPath Form Services does not support claims based authentication (that's what MS Support told us, when we faced a similar issue with Nintex Workflow.asmx about a month back).

If you look in the IIS logs you will see that the calls to the UserProfileService.asmx are getting made as nt authority\anonymous user instead of the currently logged in user. This happens because FormServer when making the call to the WS is able to use only Basic or Digest mode for passing credentials.

You can fix the issue temperorily by using the udcx:Authentication tag of the udcx file, either by speciying a hard coded user name and password or setting it up to use Secure store service. This fix works because the GetProfileByName method does not require the the currently logged in user to be imperonated when making the call.

But sooner or later you would come across a scenario in which you need to make a call to a Web Service that requires that the call be made using the logged in user's credentials (for eg: GetRunningWorkflowTasksForCurrentUser method in Nintex Workflow.asmx), which would fail if you are using InfoPath Form Services in a Claims based environment

Important:

The SharePoint application and code described in this article will not work if SharePoint is configured for forms-based authentication. To work correctly, the web application that hosts this SharePoint application must be configured to use classic-mode authentication. For more information about configuring SharePoint authentication, see Plan authentication methods (SharePoint Server 2010)".

  • yes its in classic mode authentication . and userprofilebyname isnt working. how do i hard code udcx file user name and password? – jaylisto Jun 10 '16 at 1:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.