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 full block of XML to the end of this post.

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

1
2
3
4
5
6
7
8
9
10
11
12
<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 through Central Administration

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

From the screen:

  1. Click on the “Create New Connection” button and enter the information as below

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

User Profile Import Settings

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

Person App Definition XML

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?xml version="1.0" standalone="yes"?>
<LobSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadata.XSD" xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog" Type="Database" Version="9.0.0.0" Name="Person2K6_LiteLOBSystem">
<Properties>
<Property Name="WildcardCharacter" Type="System.String">%</Property>
</Properties>
<LobSystemInstances>
<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>
</LobSystemInstances>
<Entities>
<Entity EstimatedInstanceCount="0" Name="Person">
<Identifiers>
<Identifier Name="UserNameIdentifier" TypeName="System.String" />
</Identifiers>
<Methods>
<Method Name="GetPerson">
<Properties>
<Property Name="RdbCommandText" Type="System.String">SELECT UserName, PersonId, Title, FirstName, LastName, Location, EmailAddress, JobTitle, Extension, Fax, FROM PERSONS WHERE UserName LIKE @UserName</Property>
<Property Name="RdbCommandType" Type="System.Data.CommandType">Text</Property>
</Properties>
<FilterDescriptors>
<FilterDescriptor Type="Wildcard" Name="UserNameFilter" />
</FilterDescriptors>
<Parameters>
<Parameter Direction="In" Name="@UserName">
<TypeDescriptor TypeName="System.String" IdentifierName="UserNameIdentifier" AssociatedFilter="UserNameFilter" Name="UserNameParam">
<DefaultValues>
<DefaultValue MethodInstanceName="PersonFinder" Type="System.String">%</DefaultValue>
<DefaultValue MethodInstanceName="PersonspecificFinder" Type="System.String">%</DefaultValue>
</DefaultValues>
</TypeDescriptor>
</Parameter>
<Parameter Direction="Return" Name="Persons">
<TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="PersonDataReader" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="PersonDataRecord">
<TypeDescriptors>
<TypeDescriptor TypeName="System.String" IdentifierName="UserNameIdentifier" Name="UserName" />
<TypeDescriptor TypeName="System.Int32" Name="PersonID" />
<TypeDescriptor TypeName="System.String" Name="Title" />
<TypeDescriptor TypeName="System.String" Name="FirstName" />
<TypeDescriptor TypeName="System.String" Name="LastName" />
<TypeDescriptor TypeName="System.String" Name="EmailAddress" />
<TypeDescriptor TypeName="System.String" Name="Location" />
<TypeDescriptor TypeName="System.String" Name="JobTitle" />
<TypeDescriptor TypeName="System.String" Name="Extension" />
<TypeDescriptor TypeName="System.String" Name="Fax" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="PersonFinder" Type="Finder" ReturnParameterName="Persons" ReturnTypeDescriptorName="PersonDataReader" ReturnTypeDescriptorLevel="0" />
<MethodInstance Name="PersonspecificFinder" Type="SpecificFinder" ReturnParameterName="Persons" ReturnTypeDescriptorName="PersonDataReader" ReturnTypeDescriptorLevel="0" />
</MethodInstances>
</Method>
</Methods>
</Entity>
</Entities>
</LobSystem>