Recently I wrote a post about my experience setting up Windows Live ID authentication with SharePoint 2010. This time around I am going to talk about a feature of Windows Azure AppFabric called Access Control. By using Windows Azure AppFabric Access Control with SharePoint I can allow users to authenticate not only by Windows Live ID and Active Directory but also Google, Yahoo! and Facebook!

Since there are several steps for configuring SharePoint 2010 with Windows Azure Access control I have broke the post up into two parts. The first part covered the Windows Azure AppFabric configuration and this part will cover the SharePoint 2010 configuration.

Previously we configured Windows Azure AppFabric and created a self-signed certificate used to encrypt the SAML token that will be passed back to SharePoint.   We now need to configure a trusted provider in SharePoint 2010 that will connect out to our Windows Azure AppFabric service.

  1. First we need to export our self-signed certificate again but this time without the private key included.

    1. As an administrator, click Start, type the following into the Search box, and then press Enter:
      mmc
    2. In the MMC console, click File, and then click Add/Remove Snap-in.
    3. Select Certificates, and then click Add.
    4. Select My user account, and then click Finish.
    5. To close the Add Standalone Snap-in dialog box, click OK.
    6. In the console, double-click Certificates – Current User.
    7. In the console, expand Personal,and then expand Certificates.
    8. Right-click the certificate you created previously. Click All Tasks,and then click Export to start the Certificate Export Wizard.
    9. On the Certificate Export Wizard Welcome page, click Next.
    10. On the Export Private Key page, select No, export the private key, and then click Next.
    11. On the Export File Format page, ensure that the option DER encoded binary X.509 (.CER) is selected.
    12. In the Password fields, enter a password (twice), and then click Next.
    13. In the File name field, enter Azure-Dev, and then click Next. I recommend that you create a c:temp folder and export the certificate there. It will make future steps easier.
    14. Click Finish.
  2. Copy the following PowerShell Script code and paste it into Notepad.  You will be making a few minor changes to this script.
  3. Modify the script you just placed into Notepad using the guidance below:
    1. Ensure that the $certloc path is correctly pointing at the certificate we exported in step #1.
    2. Modify the $ream variable and replace urn:fabrikamspdemo:spub with the realm you specified when creating the Windows Azure AppFabric service.   You can find this value in the Relaying party application settings inside the Windows Azure Access Control Service portal.
    3. Modify the $signInUrl variable.  Replace fabrikam in the URL with your Windows Azure Service Namespace.   You can find the namespace by looking in the silver bar on the top of the Windows Azure Access Control Service portal.
      image
  4. Save the script to your temp directory and name it Azure.ps1
  5. Open up PowerShell as an administrator.
  6. Switch to the temp directory where your Azure.ps1 file is located
  7. Run the script by typing .Azure.ps1 and then pressing enter.   The script should complete without any errors.
  8. You will now create a new SharePoint 2010 web application for use with the Azure ACS authentication.
    1. Open up SharePoint 2010 Central Administration and click on the Manage web applications link.
      image
    2. Click New in the ribbon bar to create a new web application.
    3. Fill out the Create New Web Application using the following guidance below and then click OK.
      1. Authentication -  choose Claims Based Authentication
      2. IIS Website –  choose to create a new IIS web site.  Enter in a name and set the port to 443.    (used for SSL)
      3. Security Configuration –  Set allow anonymous to No and use Secure Socket Layer to Yes.
      4. Claims Authentication Types -  Choose Enable Windows Authentication, Integrated Windows authentication and select NTLM from the drop down.  Also choose Trusted Identity Provider and then select Azure ACS.
        image
      5. Sign In Page URL  – Select Default Sign In Page
      6. Specify appropriate values in the Public URL, Application Pool and Database Name and Authentication sections based upon your preferences.
  9. After the Web Application is created you will need to create your site collection.  Ensure that your personal Windows Account is added as the primary site collection administrator.  This will ensure that you will have full permissions on the site collection.   If your Windows Account does not properly resolve when you type it into the text box, click on the squiggly red line, it should display your Active Directory account.  Choose it.
  10. The final step is to configure the IIS web application we just created with the proper SSL certificate.   In this example we will create a self-signed certificate and use that.
    1. Open IIS manager and select the server node.
    2. Under the IIS grouping double click on Server Certificates
    3. On the right hand side under Actions choose Create Self-Signed Certificate.
    4. Enter a name for your certificate and click OK.
    5. On the left, select your web application you just created in SharePoint.
    6. On the right select bindings… (under the edit site heading)
    7. Select the HTTPS binding and click Edit
    8. In the SSL Certificate drop down box, choose the certificate you just created and then click OK.
    9. Click Close on the Site Bindings dialog box.

 

This concludes the configuration of SharePoint 2010 for use with the Windows Azure Access Control Service.  Open up a browser and navigate to your new SharePoint web application.  Do not forget to use HTTPS.  If you are using a self-signed certificate for SSL you may see the message shown below.  Just click continue to this website.

image

You should now see the following authentication selection screen:

image

Choosing Azure ACS will redirect you to the Windows Azure authentication selection screen.

image

Here is where your users can choose Windows Live ID, Google or Yahoo!.   Clicking on one of the options will present you with the corresponding log in page.   Once the user enters in their credentials they will be redirected back to your SharePoint site.   If they have been given proper permissions on the site then they will see the site content otherwise they may see the SharePoint access denied message.

Below is a screen shot of a user that has logged in using their Google ID.

image

 

In a future post I will provide a few tips on using Windows Azure Access Control Service, including how to give users permissions to your SharePoint sites.

Update 4/7/2012:  Wictor Wilen has created a great series of posts that cover Windows Azure Access Control Services in details check them out:

Visual guide to Azure Access Controls Services authentication with SharePoint 2010 – part 1
Visual guide to Azure Access Control Services authentication with SharePoint 2010 – part 2 – common problems
Visual guide to Azure Access Control Services authentication with SharePoint 2010 – part 3 – Facebook
Visual guide to Azure Access Controls Services authentication with SharePoint 2010 – part 4 – multiple web applications
Visual guide to Azure Access Controls Services authentication with SharePoint 2010 – part 5 – Custom Claims
Visual guide to Azure Access Controls Services authentication with SharePoint 2010 – part 6 – Facebook integration