MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Mapping SharePoint properties to datasource properties

  Asked By: Krista    Date: Jul 30    Category: MOSS    Views: 2701

I've been playing with MOSS 2007 B2TR and have configured an SSP to import profile information from LDAPv3. However, I've been pulling my hair out lately trying to figure out how to get SharePoint to recognize the LDAP field/attributes in the "Data source field to map" drop-down list (/ssp/admin/_layouts/EditProperty.aspx) so I can map SharePoint properties to datasource properties. The default values in the drop-down list are not relevant to my datasource. One would expect the list to contain dynamically generated attributes from the currently configured datasource but alas this is not happening. I have not been able to find any class in the SDK that allows for the addition/removal of datasource properties within that drop-down list.

I did find a class (Microsoft.Office.Server.UserProfiles.DataSource) that will let me map a SharePoint property to a Datasource property. Some interesting behavior here.

SPSite site = new SPSite("http://sitename");
ServerContext context = ServerContext.GetContext(site);
UserProfileConfigManager upcm = new UserProfileConfigManager(context);
DataSource ds = upcm.GetDataSource();

// Property, DataSource Property, Connection Name
ds.PropertyMapping.Add("SPS-School", "schooling", "ldapv3");

I through the above code in a try/catch block, and tried to update the "Schools" SharePoint property to map to "schooling" which in my case, is a valid LDAP attribute. Upon refreshing the property page, I could see that the map worked as "schooling" was visible on the "View Profile Properties" page. However, when editing the property the drop-down list at the bottom was set to "Not mapped" because "schooling" was not in the list. The add() method blindly assumes the datasource property exists and does not throw an exception if it does not exist. Anyhow, I decided to start the profile import and as suspected it did not import the value of the LDAP attribute.

Does anyone know where the data source fields in the drop-down list are coming from? Running out of ideas...



1 Answer Found

Answer #1    Answered By: Megan Martin     Answered On: Jul 30

If your importing from LDAP v3, its hit and miss...


Didn't find what you were looking for? Find more on Mapping SharePoint properties to datasource properties Or get search suggestion and latest updates.