Importing SharePoint user profile multi-value properties using BCS

I was asked by one of my customers to help troubleshooting why they could not import multi-value values for user profiles using BCS in SharePoint 2010, first of all this TechNet article and Spence Harbar’s blog have a lot of good information on planning augmenting user profiles using BCS in SharePoint 2010 which is highly recommended if you have not looked at yet. In this case customer had a BCS model which had “Read Item” and “Read List” methods implemented and simply returning data as “UserID” (Same value as Windows account name map to identifier) and “Skill” (one or more), the issue was when trying to create the sync the option to for “1:many mapping”  was disabled:


and they were only allowed to do a 1 –> 1 mapping and hence only importing the first skill into “Skills” user profile property!


As I was reviewing the BDCM file I noticed that the comparison filter for “UserID” was missing, after adding the “FilterDescriptor” :

                <FilterDescriptor Type="Comparison" FilterField="UserID" Name="UserID"> 
                    <Property Name="UsedForDisambiguation" Type="System.Boolean">false</Property> 
                    <Property Name="IsDefault" Type="System.Boolean">false</Property> 
                    <Property Name="CaseSensitive" Type="System.Boolean">false</Property> 
                    <Property Name="Comparator" Type="System.String">Equals</Property> 
                    <Property Name="UseValueAsDontCare" Type="System.Boolean">true</Property> 
                    <Property Name="DontCareValue" Type="System.String"></Property> 

and configuring the sync connection along with setting the “Filter items by” for “1:many” setting:



All values were imported to “Skills” property as a multi-value data after starting the sync:


Comments (1)

  1. Jared says:

    Thanks for the post, but I really don't understand where you got the filterdescriptor from.

    I created my BDC in designer and make an item read and listread command.  I am guessing that you are referring to the readlist command.  I want to use the filed EmpNumber.  I am not sure what to do with this screen and how you got values like DontCareValue, and UseValueAsDontCare.  How can I add this filter to my external content type?  Will this mess anything else up, or is it just there to get around the issue with the profile sync?