InfoPath 2010/2013: UserInformationList query for current logged in user

Sometimes you just want to use more information like just the user id within your InfoPath form. Now you are able to use the SharePoint webservices but it is also possible to query the userinformation list in SharePoint. The result looks like this:

To achieve this goal it is just a few clicks away. What we need is a data connection to the relevant SharePoint. In my case I retrieve this data from our mysite url.

Be sure that the following options are unchecked:

Now we need a Form Load Action to set query parameter for the new data connection. Something like this:

And we also need to query the data connection to retrieve the relevant user information:

At least you need to create your form. You need a repeating table if you will show more than one result. But if you only show up the current user information you just add the dataFields of your secondary fields section.

That’s it!

..:: I like SharePoint ::..

The article or information provided here represents completely my own personal view & thought. It is recommended to test the content or scripts of the site in the lab, before making use in the production environment & use it completely at your own risk. The articles, scripts, suggestions or tricks published on the site are provided AS-IS with no warranties or guarantees and confers no rights.

About Dennis de Vries 34 Articles
Loving SharePoint, Social Media and like to work together with creative people all over the world.


  1. Hi, Nice article. I tried this but couldn’t get it working. I do not know what seems wrong, no error message, is just that no returned data from my sharepoint server. I’m using infopath 2013 and sp2013.

    thanks in advance.

    • Did you set the query parameter while the form is loading? You have to set it to “current user” or something else to get only one user. After that you have to load the query manually.

  2. Hi Dennis

    Can you please go into more details regarding the data fields setup. Like which user did you user in the set field value. My data fields only have repeating tables so it retrieves all the user instead of one.

    Please help
    Thank You

  3. Nette Sache solange man das Formular im InfoPath startet. Aber sobald es auf der SharePoint-Bibliothek veröffentlicht wird, erscheint nichts. Der Abschnitt wird gar nicht angezeigt und ein einzelnes Feld bleibt leer.

  4. if I want to populate the email address of a user that is not the current user which cannot be pulled from AD, I can use the User List. What are the rules to populate the email address for an “other than” current user?

  5. i used your guide and i set text box control on my form. in default value of this control i set user name field from User information list (Secondary) but i cannot receive username of current user

Leave a Reply

Your email address will not be published.