Infopath 2013 reads AD user information through Userprofileservice

Source: Internet
Author: User

I just saw something. C # articles Get more information about the current user's use of the Web service.
Without writing any code, you can achieve exactly the same result. So here's a brief introduction:
* If you are already familiar with this, this article can be skipped.
* This presentation is based on InfoPath and InfoPath Forms services.

    1. Use InfoPath to open Tools > Data Connections and Click "Add ..." to add a new form of data connection. This opens the Data Connection Wizard.
    2. We want to pick up data about the current user, so select Receive data, and then click Next.
    3. Select the SOAP Web service.
    4. Http://ServerName/_vti_bin/UserProfileService.asmx Type the address , and then click Next.
    5. Select Getuserprofilebyname , and then click Next.
    6. In this screen you can specify what parameters are sent in the method, we choose here to click Next .
    7. Click Next and make sure that the data is automatically retrieved when the form is checked for opening .
    8. Complete the wizard.

The Getprofilebyname method returns a propertydata. You can think of it as a repeating table name and value, so now that you have a data connection, you can get the value of the current user that you can use it. In this example, I will display the user's name in a text box.

1. Add a text box

2. Double-click the text box, properties, and clicking the "FX" button.

3. Click "Insert field or group"

4. Select Getuserprofilebyname at the data source.

6. Expand the data domain Group under all groups, and select the Value field, and do not click OK!!!

7. Click "Filter Data" and select "Name" = "Preferredname" in the first drop-down value, where preferredname refers to the full name. Of course, we have to fill in according to your actual situation, for example: "Userprofile_guid,accountname,firstname,lastname,preferredname,workphone,office,department"

Finally, come to Zhang:

Note:

Here is a complete list of the default profile properties that get returned by Userprofileservice.

Userprofile_guid
AccountName
FirstName
LastName
Preferredname
Workphone
Office
Department
Title
Manager
Aboutme
Personalspace
Pictureurl
UserName
Quicklinks
WebSite
Publicsiteredirect
Sps-dotted-line
Sps-peers
Sps-responsibility
Sps-skills
Sps-pastprojects
Sps-interests
Sps-school
Sps-sipaddress
Sps-birthday
Sps-mysiteupgrade
Sps-dontsuggestlist
Sps-proxyaddresses
Sps-hiredate
sps-lastcolleagueadded
Sps-owaurl
Sps-resourceaccountname
Sps-masteraccountname
Assistant
Workemail
CellPhone
Fax
HomePhone

The above fields can be

Central Administration Profile Services: User Profiles Service Application-Manage user attributes for

Infopath 2013 reads ad user information through Userprofileservice

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.