When it comes to user profiles in SharePoint, I
frequently hear the same request: “I’d like to include fields from my
HR database in user profiles.” In this section, I shall demonstrate how
to set up this process. The steps that follow make the following assumptions:
- You have a working User Profile Service Application.
- You have a working User Profile Synchronization with AD or LDAP.
- You have My Sites configured.
With the prerequisite assumptions out of the
way, it’s time to get started with configuring user profile fields that
link to Business Connectivity Service sources. For the scenario to
work, you need a common attribute that links user profiles in
SharePoint and records in your external line of business system. I have
chosen the e-mail address attribute, since the e-mail address is
present in Active Directory and my Employee external content type.
For simplicity, you will create a new managed
user property that links the e-mail address in Active Directory with
that in your external line of business system.
- Open Central Administration.
- Click the link to manage service applications, under the Application Management heading.
- Scroll and select the User Profile Service application.
- Click the Manage icon on the ribbon.
- Click the link to manage user properties.
- Click the link to create a new property.
- Give the property a unique name and display name.
- Leave the property type as String.
- Scroll to the Mappings section.
- Map the AD “mail” attribute using an import mapping.
- My mapping looks like that in Figure 1.
- Set the policy for the property as optional and visible to
everyone—this is not a requirement, but it makes life easier for
dealing with users who do not have the e-mail address populated in AD.
- Click the OK button to save the property.
- Return to the main User Profile Service Application home page.
- Click the link to start a profile synchronization.
- Start a full synchronization.
- Wait for the synchronization to complete.
- Click the link to manage user profiles.
- Search for a user who is present both in SharePoint and AD.
- Check to see if the e-mail address populated into the
custom-created profile property (assuming you populated the e-mail
address in AD!).
You now have a custom user profile property,
mapped to an attribute in Active Directory; you have completed a full
import and confirmed that user profiles contain this field with
populated data. Next, you will configure a synchronization connection
in the User Profile Service (UPS) Application that maps records in the
Adventure Works ECT with user profiles.
- Return to the main User Profile Service Application home page.
- Click the link to create a new synchronization connection.
- On the next page, click the link to create new connection.
- Change the type to Business Data Connectivity and wait for the page to refresh (Figure 2).
- Give the connection a name.
- Choose the external content type using the entity picker.
- Choose the 1:1 mapping and select the Unique Email property you created earlier for the e-mail mapped to the AD user profile.
- Click the OK button.
The last set of steps in this demonstration
involves surfacing columns from the external content type within user
profiles. Profiles in Active Directory map to records in the external Adventure Works database using the e-mail address property you configured earlier.
- Return to the main User Profile Service Application home page.
- Click the link to manage user properties.
- Click the Job Title property and then select Edit in the drop-down control.
- The Job Title property currently maps to an attribute in AD; scroll to the Mappings section and click the Remove button.
- Change the Source Data Connection to the external data connection for the Adventure Works database.
- Select the Job Title column in the attribute drop-down control.
- Click the Add button.
- Click the OK button to save the property.
- Feel free to add new properties, or use existing properties, and
then map them to other columns in the Adventure Works Employee external
content type.
- Ensure that a user profile exists in Active Directory with an
e-mail (mail attribute) value that matches a record with e-mail address
in the Adventure Works database.
- Return to the main User Profile Service Application home page.
- Click the link to start a profile synchronization.
- Run a full synchronization.
- Once the profile sync completes, click the link to manage user profiles.
- Search for a profile that exists in AD and Adventure Works with the same e-mail.
- Edit the profile and confirm that the job title is that from the Adventure Works source.