Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Creating a Profile Definition with Two Data Sources

Commerce Server 2002

The steps outlined in this section describe a scenario for creating a user profile definition that stores data in both a SQL Server database and an Active Directory database. This scenario is meant only to describe the process; do not use the actual profile described. You should design your profile definitions based on your business requirements.

Ee825428.note(en-US,CS.20).gif Note

  • Your Commerce Server 2002 Active Directory domain controllers must be installed and configured before you can complete the following steps. For information about planning for Active Directory, see Planning for Active Directory Integration.

To create a profile definition with two data sources, you perform the following steps:

Step 1: Create the ProfileService_ADSource Data Source

  1. On the SQL Server/Commerce Server computer, expand Commerce Server Manager, expand Global Resources, expand Profiles, expand Profile Catalog, right-click Data Sources, and then click New Data Source.
  2. In the New Data Source dialog box, do the following:
    Use thisTo do this
    Name Type UPM_ADSource_test.
    Display NameType ProfileService_ADSource_test.
    DescriptionType Active Directory data source.
  3. Click Next.
  4. In the Data Source dialog box, in the Source Type drop-down list, select LDAPv3-Compliant Source, and then click Next.
  5. In the Partitions dialog box, make sure the Partitioned Data Source check box is not selected, and then click Add.
  6. In the Partition dialog box, click Edit.
  7. In the LDAP Connection String dialog box, do the following:
    Use this To do this
    ServerType the name of the Active Directory domain controller. In this example, the name is MSCS01.
    Port Leave blank (unless you are using a value other than 389).
  8. Click OK.
  9. In the Partition dialog box, make sure that the Default Partition check box is not selected.
  10. In the Partition dialog box, do the following:
    Use thisTo do this
    User NameType your Microsoft Windows domain and user name for the Active Directory domain. Type it in the form domain\username.
    Password Type your Windows domain password.
  11. Click Next.
  12. In the System Attributes dialog box, do the following:
    Use thisTo do this
    Parent URLType the location on the Active Directory server where you want your Active Directory data to be stored relative to the root.
    Domain NameType the domain name of the Active Directory server.
Ee825428.note(en-US,CS.20).gif Note
  • Do not change the default settings for the other options in the dialog box. The one exception is, you might want to select the Use the same credentials for all users option. This option forces the Profiles resource to use the credentials you entered in step 7 whenever it communicates with the Active Directory server. If you do not select this option, the Profiles resource uses the credentials of the process in which it is currently running.
  1. Click Next.
  2. In the Custom Attributes dialog box, click Finish.
  3. In the Partitions dialog box, click Finish.

The ProfileService_ADStore partition appears as a new node under Data Sources in Commerce Server Manager.

Step 2: Add the Active Directory User Object

You create a profile data object to map a profile property to the Active Directory user class.

  1. Expand Commerce Server Manager, expand Global Resources, expand Profiles, expand Profile Catalog, expand Data Sources, expand the ProfileService_ADSource_Test data source you created in the previous procedure, right-click Data Objects, and then click New Data Object.
  2. In the New Data Object dialog box, do the following:
    Use thisTo do this
    Object NameSelect user. This is the Active Directory user class.
    Display NameType AD User Object.
  3. Click OK.

The AD User Object data object is added to the ProfileService_ADSource_test data source.

Step 3: Add Data Members to the AD User Object

You create a profile data member to map a profile property attribute to a column in a table in the database you mapped the data source to. In this example, we will add nine data members to the AD User Object data object created in the previous procedure. These members are for the user name, user password, and common name.

  1. Expand Commerce Server Manager, expand Global Resources, expand Profiles, expand Profile Catalog, expand Data Sources, expand ProfileService_ADSource_test, right-click AD User Object, and then click New Data Member.
  2. In the New Data Member dialog box, do the following:
    Use thisTo do this
    Member NameSelect cn.
    Display NameType Common Name.
  3. Click Add.

    By default, the cn data member is marked as Required, Indexed, and Primary key.

    Ee825428.note(en-US,CS.20).gif Note

    • The SAMAccountname data member is required for every instance of user class or any other class derived from the user class for the Active Directory data source. The SAMAccountname data member is a string property, and it must be unique.
  4. Repeat this procedure to add the following data members:
    Member nameDisplay nameType
    SAMAccountnameSecurity Account Manager Account nameString
    givenNameFirst NameString
    InitialsInitialString
    snLast NameString
    streetAddressStreet AddressString
    CityCityString
    StState/ProvinceString
    postalCodePostal CodeString
    coCountry/RegionString
  5. Click Finished.

Step 4: Create the Active Directory-SQL User Profile Definition

You use the AD User Object data object to create your custom profile definition. This profile definition will collect user profile information. Most of the properties will be mapped to a SQL Server database. The user name and password will be mapped to Active Directory.

You create this multiple-source profile by selecting the properties you want and mapping them to data members from different data sources.

  1. Expand Commerce Server Manager, expand Global Resources, expand Profiles, expand Profile Catalog, expand Data Sources, expand ProfileService_ADSource_Test, expand Data Objects, right-click AD User Object, point to New, and then click New Profile_Definition.
  2. In the New Profile Definition dialog box, do the following:
    Use thisTo do this
    Name Type AD_SQL_User.
    Display NameType AD-SQL User.
    Description Type User profile definition using AD and SQL sources.
  3. Click Next.
  4. In the Custom Attributes dialog box, click Finish. (No custom attributes are created for this example.)

The new profile definition appears in the list of available profile definitions in Commerce Server Manager.

Step 5: Add Property Groups to AD-SQL User

To make your profile definition easier to read, you can create separate groups for your Active Directory and SQL Server properties. Before you add the SQL Server properties to your AD-SQL User profile definition, create the data groups.

  1. Expand Commerce Server Manager, expand Global Resources, expand Profiles, expand Profile Catalog, expand Profile Definitions, and then click AD-SQL User. The Properties list appears in the right pane.
  2. Click Add.
  3. In the Add -- Web Page dialog box, select Add a new group, and then click OK.
  4. In the Attributes section, do the following:
    Use thisTo do this
    NameType ADGroup.
    Display NameType Active Directory.
  5. Click Apply.
  6. In the Properties list, select Active Directory, the group you just created, and then click the Up Arrow button at the bottom of the dialog box. Keep clicking it until Active Directory is moved to the top of the Properties list, above all of the other properties.
  7. Click the directional arrow to the left of Active Directory so that it points down. This expands the node, and prepares the group to accept properties.
  8. Click the first property underneath Active Directory. If you followed the preceding procedures exactly, this will be the Common Name property.
  9. Click the Up Arrow button at the bottom of the dialog box. The property name appears indented under Active Directory. This places the property in the Active Directory group.
  10. For each of the remaining properties, select its name and click the Up Arrow button.
  11. To add the SQL Server group to the property definition, click the Add button.
  12. In the Attributes section, do the following:
    Use thisTo do this
    Name Type SQLGroup.
    Display NameType SQL Server.
  13. Click Apply.
  14. To move the SQL Server group name to the left, click the Down Arrow at the bottom of the dialog box.

The properties you added are organized in the new property groups.

Step 6: Add SQL Server Properties to AD-SQL User

You have created a profile definition named AD-SQL User that has two property groups: Active Directory and SQL Server. You have already included the Active Directory properties. Next, you need to add the SQL Server properties.

  1. Expand Commerce Server Manager, expand Global Resources, expand Profiles, expand Profile Catalog, expand Profile Definitions, and then click AD-SQL User.
  2. In the profile definition screen, in the Properties list, click Common Name. The property attributes appear to the right.
  3. In the Advanced Attributes section, do the following:
    Use thisTo do this
    Key TypeSelect Dual (Primary and Join). When using multiple data sources in a profile definition, it is necessary to create a join key that maps to both sources.

    Ee825428.important(en-US,CS.20).gif Important

    • After you save a join key, you cannot change it at a later date.
    Map to DataClick the ellipsis [...] button. In the Data Source Picker dialog box, expand ProfileService_ADSource_test, and then expand AD User Object. Select ProfileService_ADSource, and then select User Object. Expand ProfileService_ADSource_test and then select User.
  4. Hold down the CTRL key and select both u_logon_name (located under User Object), and cn (located under AD-SQL User), and then click OK to close the Data Source Picker dialog box.

    Both properties appear in the Map to Data box.

  5. In the Advanced Attributes section, select the RDN box, and then click Apply.

    The join key properties are designated as the Relative Distinguished Name (RDN) for the profile. The RDN must exist to create a valid profile that is mapped to an LDAPv3 source, such as Active Directory. (This is not required for OLE DB sources, such as SQL Server.)

  6. In the Properties list, click the directional arrow to the left of SQL Server, and then click Add.
  7. In the Add -- Web Page dialog box, select Add a new property, and then click OK.
  8. In the Properties list, select New Property 1.

    Add the properties in the following New Properties table to the AD-SQL User profile definition.

    NameDisplay nameTypeMap to data
    u_user_security_passwordPasswordStringPassword
    i_account_statusAccount StatusNumberAccount Status
    u_user_catalog_setCatalog SetStringUser Catalog Set
    d_data_registeredDate RegisteredDate/ TimeDate Created
    i_partner_desk_rolePartner Service RoleNumberPartner Service Role
    d_date_last_changedDate Last ChangedDate/ TimeDate last changed
  9. In the Attributes section, do the following:
    Use thisTo do this
    NameType the programmatic name for the property from the Name column in the previous table.
    Display NameType the display name for the property from the Display name column in the previous table.
    TypeSelect from the drop-down list the property type for the property from the Type column in the previous table.
  10. In the Advanced Attributes section, click the Map to Data ellipsis [...] button. Navigate to SQL Server User Object, and then select the data member for the property from the Map to data column in the previous table.
  11. To apply the changes you made to the property, click Apply.
  12. Repeat Steps 7 through 11 until you have added all of the properties in the New Properties table.
  13. To save the profile definition, click Ee825428.save(en-US,CS.20).gif on the toolbar.

If you used the AD-SQL User profile definition on your Web site, it will store data in both a SQL Server database and an Active Directory database.

Copyright © 2005 Microsoft Corporation.
All rights reserved.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.