This is a guide to importing data from BCS to the User Profile Service.
Apply permissions to the data source
In order to get successful with BCS import, it is important to apply the correct permissions to the data source e.g. the SQL server. The following should have access to the data source (dependent on which connection one chooses when the external content type is created):
• The user account which is used for creating the external content type through SharePoint Designer. This gives you access through SharePoint Designer (as contosousername).
• The BCS Service account and the service account on the web application. This will allow you to view the external list through your browser (as.contososp_service and contososp_webapp).
• The User Profile Service/FIM service account (as contososa_spfarm). This account is used to synchronize profile data through BCS.
Create an external content type through SharePoint Designer
Choosing the correct way to connect to the data source is important. If you do not use Secure Store, you can choose to connect with User’s Identity. However, this should only be practiced if you use Kerberos. If you do not wish to use Secure Store and if you do not use Kerberos, you can use User’s Identity and change to BCS’s Identity at a later time. Check out this guide: http://blogs.msdn.com/b/sridhara/archive/2010/03/10/bcs-and-external-list-learning-part2.aspx
Notice, that the column you choose as key in the external content type is the column you will later be combining with a field in the User Profile Service. Therefore, it is important to choose a unique column which also exists in the User Profile Service. Ideally, you will use a column of one of the following formats:
• Contosousername = AccountName in the User Profile Service
• Username = UserName in the User Profile Service
• username@contoso.com = WorkEmail in the User Profile Service
After you have created the list through SharePoint designer, you will be denied access by the BCS. This is addressed by providing access (set permissions for the external content type) through BCS in the Central Administration.
Add a new connection to BCS through the User Profile Service
Choose the newly created content type. Here you will combine a column in the user profile with the chosen key in the external content type. These should be similar in order to find a match when you synchronize. Use one of the recommended formats above.
Map fields to User profile Properties in the User Profile Service
After the above is performed, you can combine fields in the User Profile Service with fields in the external content type.
These tips, hopefully, will help you through some hurdles.
Webtop are Silver Exhibitors at the European SharePoint Conference 2013.
Why not keep up to date with the latest SharePoint content by joining our community or by following us on twitter or Facebook!