Navigate Up
Sign In

SharePoint Authentication using Windows Azure Access Control–Part 2

Item is currently unrated. Press SHIFT+ENTER to rate this item.1 star selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+ESCAPE to leave rating submit mode.2 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.3 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.4 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.5 stars selected. Press SHIFT+ENTER to submit. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.

 

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.
    • add-pssnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue
    • $certloc = "C:\temp\Azure-Dev.cer" 
      
      $rootcert = Get-PfxCertificate $certloc
      
      New-SPTrustedRootAuthority -Name "Azure Token Signing Cert" -Certificate $rootcert | Out-Null
      
      $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certloc)
      
      $map1 = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" -IncomingClaimTypeDisplayName "UPN" -LocalClaimType "http://schemas.xmlsoap.org/claims/UPN"
      
      $map2 = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName "Email Address" -SameAsIncoming
      
      $realm = "urn:fabrikamspdemo:spub"
      
      $signInUrl = "https://fabrikam.accesscontrol.appfabriclabs.com:443/v2/wsfederation"
      
      $ap = New-SPTrustedIdentityTokenIssuer -Name "Azure ACS" -Description "SharePoint secured by Azure" -Realm $realm -ImportTrustCertificate $cert -ClaimsMappings $map1,$map2 -SignInUrl $signInUrl -IdentifierClaim "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
      
  1. 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.
    4. 2011-05-11-SPAuthenticationAzure-Part02-01.png

  2. Save the script to your temp directory and name it Azure.ps1
  3. Open up PowerShell as an administrator.
  4. Switch to the temp directory where your Azure.ps1 file is located
  5. Run the script by typing .\Azure.ps1 and then pressing enter. The script should complete without any errors.
  6. 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.
    2. 2011-05-11-SPAuthenticationAzure-Part02-02.png

    3. Click New in the ribbon bar to create a new web application.
    4. 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.
      5. 2011-05-11-SPAuthenticationAzure-Part02-03.png

      6. Sign In Page URL – Select Default Sign In Page
      7. Specify appropriate values in the Public URL, Application Pool and Database Name and Authentication sections based upon your preferences.
  7. 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.
  8. 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.

2011-05-11-SPAuthenticationAzure-Part02-04.png

You should now see the following authentication selection screen:

2011-05-11-SPAuthenticationAzure-Part02-05.png

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

2011-05-11-SPAuthenticationAzure-Part02-06.png

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.

2011-05-11-SPAuthenticationAzure-Part02-07.png

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.

Categories: SharePoint; Management; Security

Comments

Sowmyan

Great post !

I have configured all these , but getting access denied while getting into SP site which is expected as user is not added. Can you tell me how we can add user to the site eg: google / yahoo user.

Posted 14-Dec-2011 by Sowmyan
Bronyx

Login Name

Hi, I have this working, but the issue is when users log in with there external ID (google, yahoo etc), there email address is shown as a guid e.g. https://google.com/accounts/o8/id/xxxxxxxxxxx 
 
how can I have it so that the account being logged in as is shown as the user and not have the guid.
 
Thanks

Posted 19-Dec-2012 by Bronyx
Sreenath H B

Really helpful posts - need further help

Hi Mike I followed the steps in your posts - Part 1 & 2. I've got the Signin Page - with links to Login with Google, Facebook and Windows Live ID working. I tried logging in using my Facebook ID and it did successfully redirect me back to my site. But like the other 2 comments, the user ID contains a weird GUID string plus I don't see these users in the Site Users group or any where else. I would like to know how to proceed from here. Like have them fill in more information and then give them appropriate permissions. Can you please direct me to the next steps if you know any? Thanks for this post though. Saved weeks of my time. I'd buy you a beer!

Posted 17-Feb-2014 by Sreenath H B
replica handbags uk

replica handbags uk

Two air medical insurance programs in Oregon have decided not to continue a reciprocity agreement between the two providers.Two Memberships Needed for Air Care: Life Flight, AirLink Don't Honor Each Others' MembershipsNew AirLink has reciprocity agreement with different network of providers; local citizens with memberships could be impacted 2013 High EndReplica Handbags UK Outlet Online Store. Wholesale Discount Swiss Rolex replica watches & Replica Hermes Handbags, Louis Vuitton handbagsOn Sale. 2013 Cheap Replica Watches UK, Wholesale Handbags UK

Posted 02-Mar-2014 by replica handbags uk

Notify me of comments to this article

E-mail:
   

Add Comment

Title:

 
Comment:
Email:

   


Name:

 
Url: