Using the BDC to populate user profiles from a SQL Server database - Part Two

This is the second part of a two part post. The first part can be seen here

Now that we have SSO setup and working, we now need to create and import the application definition.

I'm not going to go into to much detail on how to create a application definition, but there are various tools available that you can use (BDC Meta Manager, Microsoft Business Data Catalog Definition Editor which is part of the SharePoint Server 2007 SDK)

Here are the key parts of the application definition you need to be aware of.

I have added the XML to a Word document which can be downloaded here (Sorry WordPress doesn't let me upload XML files)

Below are the properties used by SharePoint to connect to the database. You need to  use the SSO ID specified in Part One when you setup SSO



<LobSystemInstance Name="Persons">
<Properties>
<Property Name="AuthenticationMode" Type="System.String">RdbCredentials</Property>
<Property Name="DatabaseAccessProvider" Type="System.String">SqlServer</Property>
<Property Name="RdbConnection Data Source" Type="System.String">MyServerName</Property>
<Property Name="RdbConnection Initial Catalog" Type="System.String">MyDatabaseName</Property>
<Property Name="RdbConnection Integrated Security" Type="System.String">false</Property>
<Property Name="RdbConnection Pooling" Type="System.String">true</Property>
<Property Name="SsoApplicationId" Type="System.String">SSOAppId</Property>
<Property Name="SsoProviderImplementation" Type="System.String">Microsoft.SharePoint.Portal.SingleSignon.SpsSsoProvider, Microsoft.SharePoint.Portal.SingleSignon, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Property>
</Properties>
</LobSystemInstance>

If your primary source is going to be from your Active Directory (In most cases it will be). Your identifier needs to be in the format of DOMAIN\UserName

Once you have loaded your application you need to add both the search crawl account and the user crawl account and give them execute permission . In most cases this will be the same account, but if you have followed the least privilege configuration, these will be separate accounts and both will need to be added.

To add the BDC as secondary connection, go to the following link in SSP admin;

http://myserver/ssp/admin/_layouts/MgrDSServer.aspx

Or

Shared Services Administration: My SSP > User Profile and Properties > Manage Connections

Click on the "Create New Connection" button and enter the information as below

You need to match your UserNameFilter specified in the application definition file to the AccountName User Profile field

User Profile Import Settings

Click OK and then schedule a full profile import.

Once the import has finished, check the import logs for any errors. This should always be your first port of call if it does not work.

Look for errors under the PEOPLE_DL_IMPORT content source and beginning with spsimport://$$nonmaster$$

Once the import has been run successfully, you will now be able to map the fields with the user profile properties in the "View Profile Properties" page.

You may also like: