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