Domanda

How can I use the "UserProfileService" web service in InfoPath to retrieve the "Work Address" of a user?

I am trying to have some rules around the user Country.

È stato utile?

Soluzione

First of all , you should be aware of there's no work address attribute for the user account at AD so you will not find such this property at mapped user profile properties,

enter image description here

Meanwhile,there's a country / region attribute . but Unfortunately, by default it is not mapped to User Profile properties, to find the default mapped properties ,check the full list at Default user profile property mappings in SharePoint Server 2013 from AD DS attribute

So now you need first to add new map property at user Profile for country attribute then try to build your rule based on this property at InfoPath as the following :

Add a new mapped property

  • In central Administration > Manage Service application > select UPS Service> People> Manage User Properties > New Property.

  • Select Type integer > Attribute CountryCode.

enter image description here

Then retrieve user profile properties with Country code via InfoPath as the following :

  • First, you should create a data connection from SOAP web Service at Data Tab

enter image description here

  • Select Receive Data and next then add UserProfileService web service URL via http://yoursitename/_vti_bin/UserProfileService.asmx?WSDl

  • Select Get GetUserProfileByName

  • Now you can Create a rule with country code .

  • Check how to create the rule GetUserProfileByName at infopath

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top