Welcome to MSDN Blogs Sign in | Join | Help

Jingmei Li's MSDN Blog

A place to share out tips and solutions about SharePoint, .NET, etc.
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!

http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx

Note: 

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

 

Posted: Thursday, May 31, 2007 8:45 PM by jingmeili
Filed under:

Comments

Technical Weblog of Eric Charran said:

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

# August 1, 2007 6:36 PM

Noticias externas said:

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

# August 1, 2007 7:04 PM

HyperGO said:

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.

Joel

# May 26, 2008 10:19 AM

aguest said:

www.ceapet.com InfoPath-Getthecurrentuserwithoutwritingcode

I'vejust

# July 15, 2008 1:41 AM

DAP said:

Hi Jingmei,

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

i just added user account to the root and bingo

Thanks Again,

Dmitri

# September 12, 2008 7:23 PM

Information-Worker.nl said:

Get current user information in Infopath form

# May 15, 2009 6:00 AM

jcurl said:

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.  

# June 25, 2009 2:23 PM
Anonymous comments are disabled
Page view tracker