Background: I am trying to pull data by setting up a sync connection from an external source to user profile data in SharePoint by mapping BCS connection. Created an external content type. Verified the external Content type by creating an external list. Data showed up and everything looks good.External Content type consists of 2 columns Id & City. Id is unique for user and is already being pulled to User profiles from Active Directory.
Issue: When i tried to setup the connection in User profile sync mapping BCS connection, I could not find Id in the drop down for establishing 1:1 mapping with external content type. In the drop down ‘Return items identified by this profile property’ i don’t see my Id. Which is a custom user profile property. I made sure that it is set up as a required field and data is already existing.
Resolution: Reason for Id to not show up for mapping was its string length. Data type for Id is string(single value) but the length was setup as 2000! It is setup like that for testing other stuff. Since i cannot edit the lenght once sync is performed, I created and another DuplicateId property, with datatype as default string(Single Value) and also length as default 25. Setup up the sync. It now showed up for 1:1 mapping with BCS. I was able to successfully pull external data into user profile store and setup sync connection. I tried to find out the max length allowed for string(Single value) property for it to be able to qualify for mapping with ECT’s, but did not find anywhere. Anyways this workaround worked for me. Hope it helps someone.