Exercise 1: Creating SharePoint Users

In this exercise, you will use the included AddUsersUtil, program to create users, add users to SharePoint groups and create user profiles.

Task 1 – Modifying the Connection Information Configuration File

In this task, you will review and optionally modify the application configuration file to include your specific FBA membership provider information.

  1. Browse to the AddUsersUtil.exe.config file located at %TrainingKitPath%\Labs\IntegratingSocialWebServices\Source\AddUsersUtil\ AddUsersUtil.exe.config
  2. Double-click on AddUserUtil.exe.config to open file in Visual Studio.

    Figure 1

    Modifying the configuration file for the AddUserUtil program

  3. Verify the connection string and the membership provider information matches the information configuration for the Forms Based Authentication set up in the Setting Up A SharePoint and Windows Phone 7 Development Environment Module.
  4. Make appropriate changes to provide the connection information specific to your environment.
  5. Save AddUserUtil.exe.config.

Task 2 – Modifying the Users Configuration File

In this task, you will review and optionally modify the data file to include your specific user information.

  1. Browse to the UserData.xml file located at %TrainingKitPath%\Labs\IntegratingSocialWebServices\Source\AddUsersUtil\UserData.xml
  2. Right-click on UserData.xml and select Edit to open the file in Notepad.

    Figure 2

    Modifying the list of users

  3. Verify the spSiteUrl and spGroupName is correct. The spSiteUrl is the url to the site configured for FBA and the spGroupName must be a group that exists in the FBA-configured site.
  4. Make appropriate changes.
  5. Save UserData.xml.

Task 3 – Granting Permissions to the User Profile Service Application

In this task, you will grant permissions to the User Profile Application to allow the AddUsersUtil application to create SharePoint user profiles.

  1. Click Start | All Programs | Microsoft SharePoint 2010 Products | SharePoint 2010 Central Administration.
  2. Click Manage service applications.

    Figure 3

    Navigating to the service application Central Administration page

  3. Click next to the User Profile Service Application link.

    Figure 4

    Opening the User Profile Service Application management page

  4. In the ribbon, click Permissions.
  5. In the People Picker, enter the name of the user you are currently logged into the SharePoint server with.

    Figure 5

    Adding an account to the User Profile Service Application’s access permissions

  6. Click Add.
  7. Select the user and check the Full Control checkbox.

    Figure 6

    Granting Full Control access to the current user

  8. Click OK.

    Figure 6

    Navigating to the Manage User Profile page

Task 4 – Running the AddUsersUtil Application

In this task, you will run the AddUsersUtil application and verify the users have been created.

  1. Browse to the AddUsersUtil.exe file located at %TrainingKitPath%\Labs\IntegratingSocialWebServices\Source\AddUsersUtil\AddUsersUtil.exe
  2. Double-click AddUserUtil.exe to run the console application.

    Figure 7

    Excecuting the AddUserUtil executable to create users and profiles

  3. Press a key to exit the console application.
  4. Click Start | All Programs | Microsoft SharePoint 2010 Products | SharePoint 2010 Central Administration.
  5. Click Manage service applications.

    Figure 8

    Navigating to the service application Central Administration page

  6. Click User Profile Service Application.

    Figure 9

    Opening the User Profile Service Application management page

  7. Click Manage User Profiles.

    Figure 10

    Navigating to the Manage User Profile page

  8. Enter the letter “t” in the Find profiles text box and click Find.

    Figure 11

    Search for a user’s profile

  9. Verify user profiles are returned in the result set.