BCS Column Limit

 

This is not new news, but I couldn’t find information on it at first.  Most BCS examples and implementations tend to be small so you don’t see this often:

[box type=”info”] Application definition import failed. The following error occurred: Cannot create more than ’20’ IIdentifier objects per IEntity object. Error was encountered at or just before Line: ‘199’ and Position: ’14’. [/box]

 

BCS Identifier Limit Error

In a nutshell, you cannot load more than 20 identifiers per the BCS specification (even if the BCS tools allow you to add more).

SharePoint 2010 BCS Identifier Element

http://msdn.microsoft.com/en-us/library/microsoft.office.server.applicationregistry.metadatamodel.entity.aspx

SharePoint 2007 BDC Identifier Element

http://msdn.microsoft.com/en-us/library/ms567126%28v=office.12%29.aspx

Hope this helps someone.

Enhancing User Profiles with BDC Data

The goal of using the BDC with the User Profile is to extend and/or enhance the User Profile Information. An example where this is often used is when a company stores much information in PeopleSoft (HR info usually) and well as AD. Regardless of the medium and the content, the assumption here is that the new information will add value and enhance the user profiles.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.

SQL Server Table Columns

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.

BDCMetaman Entity

Once the LitwareUserData database structure has been loaded, add the UserData table to the Designer on the right.

BDCMetaman Line of Business Application

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.

BDCMetaman Authentication

Configure the location where to create the ADF file and the MOSS SSP values.

BDCMetaman Configuration

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.

BDCMetaman Entity Properties

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.

Application Definition File (ADF)

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.

Shared Service Provider

Choose the Application Definition file that we created and click on Import.

Import Application Definition Page

Once the import has completed, click on OK to view the BDC Application page.

ADF Import Successful

Review the BDC application information and make changes as needed.

View Application Page

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.

User Profiles and Properties Page

In the View Import Connections page, click on Create New Connection.

View import Connections

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)

New Import Connection

Once completed, click on OK. In the View Import Connections page, verify the new connection.

View import Connections

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.

New Profile Property - City

In our example, we created two new Profile Properties: City and State.

New Profile Properties

Once the profile properties have been added, browse back to the User Profile and Properties page and start a Full Import.

User Profiles and Properties

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.

Query Results

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).

View User Profiles

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).

User Profile Properties

User Profile Properties - City and State

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.

People Search

In the public profile page, you will see the new profile properties containing the appropriate values.

Public Profile Page

Congratulations, you have enhance the user profiles using the BDC as a data source.