For this sample, I assume the following:
- A database in SQL Server containing your BDC user information.
- A column with the user account Id’s
- Additional columns to supplement data into the User Profile Properties
- Proper access to a SharePoint farm to do this.
- A non-production SharePoint farm (this should be properly tested and scripted before any production implementation).
- A good cup of coffee
Ensure proper access to the BDC Data Source
Depending on the type of security you wish to use to connect to the data source, you have a couple options:
|Authentication Mode||Applies To||Description|
|PassThrough||Databases and Web Services||This authentication uses the identity of the end user. IIS impersonates the user by default, but in order to avoid losing the impersonated user’s identity when the Business Data Catalog authenticates to the back-end server (or data source), Kerberos delegation must be enabled between the IIS and the back-end server (or data source). Kerberos delegation enables a receiving server (IIS) to send the authentication request to the back-end server (or data source).|
|RevertToSelf||Databases and Web Services||This authentication reverts to the application pool account.|
|Credentials||Web Services||This authentication uses basic or digest authentication depending on the configuration of the Web service. Be sure to use SSL or IPSec to encrypt the communications.|
|WindowsCredentials||Databases and Web Services||This authentication uses the Windows credentials from its default single sign-on (SSO) service.|
More on BDC authentication here.
We will be using RevertToSelf; therefore, the Application Pool account needs to have access (read access) to the database. In our example, we have a User Database with four fields: AccountName, City, State and LastModifiedDate.
Create the Application Definition File
Manually creating an ADF file is error prone and cumbersome. Save time and use a good tool. Two common tools are BDCMetaman and Microsoft’s Business Data Catalog Definition Editor which are both good options.
Run BDCMetaman and choose “Connect to datasource:” and choose the SQL Server option with the appropriate information.
Once the LitwareUserData database structure has been loaded, add the UserData table to the Designer on the right.
Be sure to explore your options in the tool. In our example, we will use RevertToSelf as the authentication mode; therefore, we use the tool to make that change.
Configure the location where to create the ADF file and the MOSS SSP values.
After saving the Configuration options, right-click on the blue area and click on Edit Entity.
Configure the Title Column to AccountName as shown below. Click on Save.
Once all these steps are completed, click on Build or Generate Application Definition to create the Application Definition file. We have created the application definition file for our BDC Application. You can open the file in your favorite text editor and you will appreciate the tool. Application Definition Files are lengthy and complex.
Import the BDC Application Definition
With our ADF file, we are ready to upload it into MOSS. Browse to your Shared Service Provider and click on Import Application Definition.
Choose the Application Definition file that we created and click on Import.
Once the import has completed, click on OK to view the BDC Application page.
Review the BDC application information and make changes as needed.
Depending on your specific security needs, you may need to modify the permissions to allow your application pool or BDC content access account proper access in the BDC Application. Click on the Manage Permission link. Once in the Manage Permission screen, add the appropriate account and give it rights to read and execute the BDC definition (Application). I usually have found that Execute and Selectable in Clients works for me.. Click on Save to continue. Important: Now click on Copy all permissions to descendants to propagate the permission to the lower application objects, such as the entities.
Create a New Import Connection for BDC
In order to use our BDC data, we need to configure the User Profiles to consume the BDC data. This requires two basic steps: Create an import connection and map the BDC data to the User Profiles. Browse to your Shared Service Provider, click on the User Profile and Properties page. Click on View Import Connections.
In the View Import Connections page, click on Create New Connection.
In the Add Connection page, configure the connection as follows:
Type: Business Data Catalog
Connection Name: LitwareUserDataLOBSystem (the name of your BDC Application)
Business Data Catalog Entity: dbo.UserData (use the selector to choose the entity)
Connection Mapping: AccountName (select the field by which the data will map to the user profiles)
Once completed, click on OK. In the View Import Connections page, verify the new connection.
Browse back to the View Profile Properties page and click on Add User Profile Property. Enter the appropriate Name, Display Name and a useful Description. Towards the bottom, choose the Source Data Connection and the data source field to map. Click on OK and repeat as needed. In this example, we are also modifying the Policy Settings for the field where Everyone can see the field. This will make the property visible to Everyone when they visit a user’s profile page.
In our example, we created two new Profile Properties: City and State.
Once the profile properties have been added, browse back to the User Profile and Properties page and start a Full Import.
Verify Successful Import
Once the full import has completed, the user profiles should contain the new data. We will start by choosing a user account from the BDC data source. We use the SQL Server Management Studio to query our source table. In this example, we use LITWAREINC’AdinaA to test our data. Therefore, in MOSS we will find that AdinaA has City and State populated as Boulder and Colorado.
A simple quick test is to view the user profile in the Shared Services Provider. In the Shared Services Provider, browse to View User Profile and click on Edit User on the account we wish to see (i.e. LITWAREINC’AdinaA).
In the Edit Profile page, we can verify the account name and the field mappings to that account. Notice the city and state are correct for Adina Hagege (LITWAREINC’AdinaA).
Our last step is to verify that our end-users can also see the new information in the public profile pages for all users. Browse to a web application and perform a search for our user (People Search). Open the user profile page in the search results. There are other ways to find users as well, searching works particularly well in MOSS.
In the public profile page, you will see the new profile properties containing the appropriate values.
Congratulations, you have enhance the user profiles using the BDC as a data source.