Retrieve Active Directory Information from the User Profile Service – part 1

Very often in InfoPath, I need to query Active Directory for certain pieces of information just so that I can have some type of functionality within my forms.  One of the most used and easiest forms of this is the user profile service.  I use this to my advantage to query e-mail addresses, user account info, etc.  Also, this is a must if you use the Contact Selector control from within InfoPath.

Follow these steps and you will be on your way.  Stay tuned for part 2 as I will be showing how to query the display name for AD accounts in a later post.

GetUserProfileByName Data Connection

  1. Create a new data connection to “Receive Data” from “Web Service”.
  2. Click Next.
  3. Type in the following url:
  4. Click Next
  5. Select “GetUserProfileByName
  6. Click Next
  7. Leave the default value for Parameter
  8. Click Next
  9. Leave box unchecked

10. Click Next

11. Name the connection “GetUserProfileByName”

12. Check the box to automatically receive data

13. Click Finish.

14. The wizard will look like the images below.



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.