InfoPath with Claims connecting to "GetUserProfileByName" - Error 5566 - error connecting to web service

Hi,

I realise this topic has been covered a fair bit out there but I'm a bit stuck.  I am testing migration from SP 2010 to 2013 and the web applications have been created using Claims Authentication.  I created my first InfoPath list form that has a connection to the GetUserProfileByName, and got the "5566" error when opening in the browser.

So after much reading and testing, I have done the following:-

  1. Created a Secure Store Target Application in CA called "InfoPathWebService" and set the Credentials to a Farm Admin (mostly for testing to try get it to work)
  2. Created a new InfoPath form with a secondary data connection to http://server/_vti_bin/userprofileservice.asmx?WSDL
  3. Converted this connection to UDCX and saved it to a Data Connections library at http://server/DataConnections
  4. Edited this file and edited the connection line with <udc:SSO AppID='InfoPathWebService' CredentialType='NTLM' />
  5. Approved this file
  6. Created a Form Load Rule with an Action on the InfoPath Form as below
  7. Created a second Action to "Query for Data" with the Data Connection to GetUserProfileByName
  8. So far so good.  Created a further Form Load rule to "Set a Field's Value" as below
  9. Click on Preview on the form - perfect - can see my name in the form in the "Name" field. 
  10. Published to the list.  Created new item in the form and I am still getting the 5566 error. 

I checked the logs and am getting the below:

Runtime - Data Connections m1v0 Warning The following query failed: GetUserProfileByName (User: 0#.w|domain\taggart_k, Form Name: Template, IP: , Connection Target: http://server/Data Connections/GetUserProfileByName_2.udcx, Request: http://server/Lists/Test List/AllItems.aspx, Form ID: urn:schemas-microsoft-com:office:infopath:list:-AutoGen-2015-03-10T21:48:06:196Z Type: DataAdapterException, Exception Message: The remote server returned an error: (500) Internal Server Error. A user with the account name could not be found. ---> The corresponding SID in the domain is not part of the intended account type. UserCannotBeFoundThe corresponding SID in the domain is not part of the intended account type. The remote server returned an error: (500) Internal Server Error.)

I'd love some pointers about what I have missed!

March 10th, 2015 7:50pm

Hi Trevor, I'm pretty sure I've followed that down to a tee and even read over it again.  I am still getting the error in the logs.
March 10th, 2015 8:16pm

Just to add the above, I played around in the InfoPath file with the field mappings (ie. Set a Field's Value to my Preferred Name) and after publishing the form to the SP list I get the same error above but now my fields are populated with my user details.

So, because the information is now displaying, I'm guessing I'm missing a permission somewhere which is throwing up the error? 

Free Windows Admin Tool Kit Click here and download it now
March 11th, 2015 12:16am

*bump*... Anybody?

I'm getting a bit desperate now.  I have started everything from scratch, created new Secure Store, New Form and Library and new .udcx data connection in a new Data Connection library and I am still getting the initial error above.  Once I click okay, my fields are populated so the information is coming through from the Web Service but something is throwing this error.

March 11th, 2015 8:55pm

Soooo... I finally fixed my issue. And, as expected it was something very, very small that I probably should have picked up on, but didn't.

When you get the point of editing the UDCX file, in the line in the file that needs to be edited to add your Secure Store ID, you need to make sure you take out the !- in front of the first reference to udc and the - (dash) after the udc at the end of the line (see below in red and circled what to take out)

This article spells it out - unfortunately, I wasn't copying and pasting, just typing in my details.  Trick for young players - https://spvee.wordpress.com/2013/04/10/auto-populate-user-information-in-infopath-with-claims-based-authentication-part-3-of-3/

Hopefully this helps somebody else!

Free Windows Admin Tool Kit Click here and download it now
March 11th, 2015 11:26pm

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

Other recent topics Other recent topics