How to display current user’s full name, email and other info in InfoPath?

Itay has blogged the exact steps and screenshots on how to display current user info (email, full name, manager, etc) in InfoPath form by calling UserProfileService.asmx in MOSS 2007, most importantly without writing any code!


I was getting the following error during my first try:

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

Server was unable to process request. ---> Attempted to perform an unauthorized operation.


Cause: I was calling the web service against the server root  that I didn’t have access to.  For example http://server/_vti_bin/userprofileservice.asmx but I didn’t have access to http://server


Solution: Call the web service against the site the InfoPath template lives in, which the current user has access to. For example http://server/sites/sitename/_vti_bin/userprofileservice.asmx


Comments (10)
  1. Recently had a situation in which we needed to access a specific field from the user profile object and

  2. Recently had a situation in which we needed to access a specific field from the user profile object and

  3. HyperGO says:

    Hi Jingmei,

    I’m also having the same proble and I did I tried your solution, where I have an access in my sharepoint site, Infact I’m using my admin account which have a full control. I also have my form set to full trust.

    Is there any other option that I’ve missed?

    Thanks in advance.


  4. aguest says: InfoPath-Getthecurrentuserwithoutwritingcode


  5. DAP says:

    Hi Jingmei,

    And thank you very much – it was driving me nuts!

    i just added user account to the root and bingo

    Thanks Again,


  6. Get current user information in Infopath form

  7. jcurl says:

    The logged in user must also have the "Personal Features" right in the Shared Service Provider to use an InfoPath form that calls the User Profile web service.  To manage Share Service Rights browse to:

    [your Shared Services Administration site]/ssp/admin/_layouts/ManageServicePermissions.aspx or click on the name of your Shared Services provider from left (Quick Launch) menu on the SharePoint Central Administration home page and then click on Personalization services permissions under the User Profiles and My Sites section.  

  8. Yalin Meric says:

    None of above worked for me. If I login using an account other than site admin, web service gives an error.

  9. KP says:

    Thank you Thank you Thank you..I missed the/sites/abc and you're a savior

  10. Felix Otieno says:

    This has really been helpful. I managed to resolve the problem. I didn't have access to the http;//server/

    Problem solved! Thanks

Comments are closed.

Skip to main content