Windows Live ID The SharePoint engineering team at Fpweb.net is always striving to discover new frontiers. To declare that the impossible is… well, possible. Recently, we put our heads together to find a way to use both Live ID and Open ID as an authentication method for SharePoint Server 2010.

With the addition of the new claims based authentication framework in SharePoint 2010, SharePoint is now more loosely coupled to the authentication layer than ever. You’ve probably seen presentations or webinars where it was mentioned that you can use claims authentication against authentication providers such as Live ID and OpenID. However, the documentation for configuring Live ID authentication is relatively hard to come by.

Recently, Chris Schwab and I were working with an Fpweb.net customer that needed to use Live ID as an external authentication source for their internet-facing hosted SharePoint 2010 Server farm.  They wanted to “outsource” the user account repository and password management for their site to Windows Live ID. While this lessened the burden of user account administration, they still needed to give the Windows Live users SharePoint permissions. Below is a step-by-step guide on how to set up claims authentication using Windows Live ID for SharePoint 2010.

Configure the Windows Live ID security token service

  1. Login to the Microsoft Services Manager for Windows Live with your Live account.
  2. Click Register Your Site.
    You’ll notice that you are redirected to https://msm.live-int.com.
  3. You are redirected to the “int” version of Live.com because your site has not been reviewed by Microsoft and has not been given the “Prod” indication (meaning your site is compliant).
  4. Below is a screenshot of the Microsoft Services Manager after clicking the “Register Your Site” link.

Configure the Windows Live ID Security Token Service

How to fill out the fields shown in the screenshot above:

  1. Name:
    1. Enter in a useful description for your site.
  2. DNS Name:
    1. Enter in a value for the DNS name of your site. This must be unique and match the setting you give for realm on the SharePoint Server (I’ll give more detail on this later)For now it can be urn:whateveryouwant.
  3. Policy:
    1. Select Window Live ID for the policy group.
    2. Click Submit and then Yes on the confirmation page.
  4. Default Return Url:
    1. https://yourdomain/_trust/default.aspx
  5. Override Authentication Policy (advanced settings):
    1. MBI_FED_SSL

Note: You will have to build your site authentication against Live-Int.com at first. Then, you’ll have to submit it to Microsoft for a compliance review. You will not be sent back real email addresses from the Live ID STS, only the PUID of the user. Once the user is authenticated to your site, they will need to enter their email/name if you need this information.

Retrieve and install the x509 certificate on the web servers

  1. Download this -int version of the x509 cert.
  2. Open it, and locate the <KeyDescriptor use=”signing” wsu:Id=”stscer”> node.
    1. Copy the contents within the <X509Certificate> node.
  3. Create a new text file in notepad, and paste the contents into it.
    1. Save as C:\LiveIDPublic.cer
    2. NOTE: from here-on, we will refer to this file as the “x509 cert”
  4. Import the new certificate using Start > Run > MMC
  5. You should see the screenshot shown below. From the File Menu, Choose:
    1. Add Snap-ins > Certificates > Computer Account > Next Local Computer > OK
  6. Import the x509 cert to all 3 places shown below:
    1. SharePoint
    2. Trusted People
    3. Trusted Root Certification Authorities

Retrieve and install the x509 certificate on the web servers

Configure a SharePoint 2010 claims provider using PowerShell

Add-PsSnapin Microsoft.SharePoint.PowerShell 
$realm = "urn:andyliveid:dev"
$certloc = "C:\LiveIDPublic.cer"
$rootcert = Get-PfxCertificate $certloc
New-SPTrustedRootAuthority "Production OpenID Token Signing Cert"
-Certificate $rootcert | Out-Null
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certloc)
$map1 = New-SPClaimTypeMapping
-IncomingClaimType "http://schemas.xmlsoap.org/claims/EmailAddress"
-IncomingClaimTypeDisplayName "http://schemas.xmlsoap.org/claims/EmailAddress"
–SameAsIncoming $map2 = New-SPClaimTypeMapping
-IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
-IncomingClaimTypeDisplayName "UPN"
-LocalClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"
$user = "[email protected]" #your unique live PUID
$apSAML = New-SPTrustedIdentityTokenIssuer
-Name "LiveIDInt" -Description "LiveIDInt"
-Realm $realm -ImportTrustCertificate $cert -ClaimsMappings $map1,$map2
-SignInUrl https://login.live—int.com/login.srf
-IdentifierClaim "http://schemas.xmlsoap.org/claims/EmailAddress"
$cpSAML = New-SPClaimsPrincipal -TrustedIdentityTokenIssuer
$apSAML -Identity $user.tolower()

Set your web app to use claims / Windows NTLM authentication

  1. Set your web app to use claims / Windows NTLM authentication Open SharePoint 2010 Central Administration > Application Management > Manage Web Applications > Select your Web application > Authentication Providers > Default Zone
  2. Select “Enable Windows Authentication”, “Trusted Identity Provider” and “LiveID”

Test your SharePoint 2010 site login with Live ID credentials

  1. Open the Fiddler 2 app you downloaded earlier so that it starts logging http requests and responses. This is useful for seeing what URLs SharePoint redirects you to and what the Live ID STS is sending back.
  2. Browse to your site on the server. You should see an authentication method drop down with Live ID and Windows as options.

If everything is setup correctly you’ll be routed to the Live-Int login page and NOT see a red error. You’ll be able to login and get redirected back to your SharePoint site where you see access denied for user [email protected]. This is because you haven’t given your live id account SharePoint permissions.

After you pass the Microsoft compliance review

This section provides an educated guess on what you’ll need to do in order to configure your SharePoint 2010 server to use the Prod live.com STS vs. INT.

(our Fpweb.net SharePoint 2010 team was able to skip this part since we were working hand-in-hand with Microsoft to get this authentication method working).

We assume that essentially, you’ll repeat all of the above steps but remove the “-int” from your Claims provider. You’ll also need to get the prod x509 certificate and use that to copy/paste when creating your cert on the web servers.

Update: 7/18/2011: Chris Schwab has written a helpful post about which Fpweb.net SharePoint Hosting Plans can utilize LiveID authentication!