I have an InfoPath Form build using InfoPath 2013. In there a textbox is to retrieve the logged in UserName of a user who open the published InfoPath form. The form is published to a Form Library.

I previewed this form in InfoPath and it showed the UserName. But when I open the new form in SharePoint using IE and Chrome in the TextBox the UserName shows as 'svc-sppoolportal'.

I can't understand about this.

Please help to solve this issue.


First, the UserProfileService.asmx does not retrieve the User from AD, it is getting the data from SharePoint User Profile Service. That service generally imports that information from AD.

When the request is from the client, the client is running as the user, so you get the user name. When running from SharePoint, it is common to run the service under the web app account, as it appears in your case. So you have to change the request to include the user name in the request.

Call GetUserProfileByName and add the current username as the parameter.

  • I have added the current username as a parameter. When I preview the form in InfoPath the username showed correctly. But when I publish the form into a form library and open the form from there the username is showing only as svc-sppoolportal. I cannot understand what's the issue. Nov 21 '16 at 4:07
  • It sounds like you are making the SOAP request as the service account and not the user. There is something wrong with how you are formatting the request. Nov 26 '16 at 6:16

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.