Back to Insights

Windows Live Id Integration With SharePoint 2010 Part 1 of 3

This will be the first of a three-part series ultimately aimed at showing you how to integrate Windows Live Id with SharePoint 2010.   The first part will introduce you to creating your own custom form-based authentication provider for SharePoint 2010.  The second part will focus on how to configure SharePoint 2010 to use your custom authentication provider.  The third part will be on how to implement a custom form-based provider incorporating Windows Live Id and integrating the solution with SharePoint 2010.

Part I - Creating a Custom FBA Provider in Visual Studio 2010 For SharePoint 2010

 These simple steps below will describe how you can create your own custom authentication provider for SharePoint 2010.

1. Create a new SharePoint project

    Creating a new empty SharePoint 2010 project


2.  Choose a farm solution because this assembly needs to be installed to the GAC     

    Choose deploy as a farm solution


3. Add a reference to System.Web

    Add a reference to System.Web

4. Add two code files:

    • 1 class to implement the abstract class System.Web.Security.MembershipProvider
    • 1 class to implement the abstract class System.Web.Security.RoleProvider

    Add two code files to your solution

5.  After you have added a using statement for System.Web.Security, right-click on the abstract class name and select "Implement Abstract Class".   This will automatically create all the method signatures and default them to throw a NotImplementedExpection

    Select implement abstract class

            At a minimum, you must implement the following methods for the MembershipProvider: 

    • System.Web.Security.MembershipProvider.GetUser
    • GetUserNameByEmail
    • ValidateUser
    • FindUsersByEmail
    • FindUsersByName

At a minimum, you must implement the following methods for the RoleProvider:

    • GetRolesForUser
    • RoleExists

For a sample implementation of a MembershipProvider and RoleProvider, please follow this link on MSDN. (