<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Justin Smith's Blog : .NET Services</title><link>http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx</link><description>Tags: .NET Services</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Mgmt Config sample for WLID / Facebook Connect sample</title><link>http://blogs.msdn.com/justinjsmith/archive/2009/11/15/mgmt-config-sample-for-wlid-facebook-connect-sample.aspx</link><pubDate>Sun, 15 Nov 2009 21:41:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9922720</guid><dc:creator>justinjsmith</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/9922720.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=9922720</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=9922720</wfw:comment><description>&lt;p&gt;Now that we have a &lt;a href="http://blogs.msdn.com/justinjsmith/archive/2009/11/14/management-browser-uploaded.aspx"&gt;mgmt tool&lt;/a&gt;, I can provide you with a template so you can setup the ACS part of the WLID / Facebook Connect sample with less effort. Here’s the XML configuration:&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:9ee1925c-7c6d-46a1-9127-c336ecd0129e" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;ServiceNamespace &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;xmlns:xsi&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="http://www.w3.org/2001/XMLSchema-instance"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; xmlns:xsd&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="http://www.w3.org/2001/XMLSchema"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Issuers&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Issuer &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;handle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="acswebauth"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;IssuerName&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;acswebauth&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;IssuerName&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Algorithm&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Symmetric256BitKey&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Algorithm&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;CurrentKey&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;gyiepxNtc7RkCZuvV6FyEPWOp788uc1T0DMSZ9c/5QA=&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;CurrentKey&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;PreviousKey&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;bAO0llCgF5C00GW/h7Zp0lt2WAe3WRrdIj42UMbds+A=&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;PreviousKey&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Issuer&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Issuers&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Scopes&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Scope &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;handle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="root"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;AppliesTo&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;http://acswebauth.com&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;AppliesTo&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;TokenPolicyHandle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;root&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;TokenPolicyHandle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Rules&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Rule &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;handle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="wlidpassthrough"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Type&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;PassThrough&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Type&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimIssuerHandle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;acswebauth&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimIssuerHandle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimType&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;uuid&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimType&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimValue &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;xsi:nil&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="true"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;OutputClaimType&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;userid&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;OutputClaimType&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;OutputClaimValue &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;xsi:nil&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="true"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Rule&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Rule &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;handle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="idppassthrough"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Type&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;PassThrough&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Type&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimIssuerHandle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;acswebauth&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimIssuerHandle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimType&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;idp&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimType&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimValue &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;xsi:nil&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="true"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;OutputClaimType&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;idp&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;OutputClaimType&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;OutputClaimValue &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;xsi:nil&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="true"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Rule&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Rule &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;handle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="fbsession"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Type&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;PassThrough&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Type&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimIssuerHandle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;acswebauth&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimIssuerHandle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimType&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;fbsession&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimType&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;InputClaimValue &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;xsi:nil&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="true"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;OutputClaimType&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;fbsession&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;OutputClaimType&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;OutputClaimValue &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;xsi:nil&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="true"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Rule&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Rules&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Scope&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Scopes&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;TokenPolicies&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;TokenPolicy &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;handle&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="root"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;TokenLifetime&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;1200&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;TokenLifetime&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;SigningKey&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;AZYQZFGR1epDZV3NC+sBEgOXVY4vIWTPZnEg28mDXy8=&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;SigningKey&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;TokenPolicy&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;TokenPolicies&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;ServiceNamespace&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;p&gt;Copy this to your clipboard, save locally, then click the load button&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/MgmtConfigsampleforWLIDFacebookConnectsa_C08C/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/MgmtConfigsampleforWLIDFacebookConnectsa_C08C/image_thumb.png" width="244" height="58" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Browse to the file on your local machine, then click the Save to Cloud button. &lt;strong&gt;&lt;em&gt;BE CAREFUL: clicking that button will erase the config in your ACS service namespace. We’ll get the merge written soon :)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9922720" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx">Access Control Service</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx">.NET Services</category></item><item><title>ACS integration with Windows Live ID &amp; Facebook Connect</title><link>http://blogs.msdn.com/justinjsmith/archive/2009/11/15/acs-integration-with-windows-live-id-facebook-connect.aspx</link><pubDate>Sun, 15 Nov 2009 21:20:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9922715</guid><dc:creator>justinjsmith</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/9922715.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=9922715</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=9922715</wfw:comment><description>&lt;p&gt;I’ve received several requests regarding ACS and Windows Live ID integration for websites. This post describes what you can do with ACS and Windows Live ID today (with the new release of ACS). It takes a bit of code, but the integration is pretty straightforward.&lt;/p&gt;  &lt;p&gt;Note that this code isn’t hardened and it relies heavily on server side code. I’m showing it as an architectural sample, and I’m showing it now based on the number of requests I’ve received for the sample. In the future, I’ll work on a better sample that’s easier to setup (and possibly one that uses javascript &amp;amp; cross domain iFrames).&lt;/p&gt;  &lt;p&gt;I’ll be discussing WLID Web Authentication as an integration point. The same basic model can apply to other WLID capabilities and other web identity providers. The code sample also has Facebook connect integration, but I won’t go into any detail about how it works in this post (in the future I will).&lt;/p&gt;  &lt;p&gt;The basic model is fairly simple. The swim lane and description is shown below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSintegrationwithWindowsLiveIDFacebookC_BB97/clip_image002_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSintegrationwithWindowsLiveIDFacebookC_BB97/clip_image002_thumb.jpg" width="491" height="349" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;1. A user browses to your website and clicks a login button.&lt;/p&gt;  &lt;p&gt;2. This button redirects the user to the WLID Redirector. The code for this redirector is in this post. For now, you’ll need to write and host this code yourself.&lt;/p&gt;  &lt;p&gt;3. The redirector redirects the browser to the WLID login page with correct WLID AppID. From there, the user logs into WLID using their credentials.&lt;/p&gt;  &lt;p&gt;4. Upon a successful login, WLID returns the browser to the redirector. The response contains a unique pair-wise ID for that user. &lt;/p&gt;  &lt;p&gt;5. Once the redirector receives the user ID, it packages that ID into an ACS token request (OAuth WRAP request for an Access Token)&lt;/p&gt;  &lt;p&gt;6. ACS will issue a token for that user and return it to the redirector (the token is a SWT).&lt;/p&gt;  &lt;p&gt;7. From there, the redirector will return the ACS token to the website&lt;/p&gt;  &lt;p&gt;8. The website will validate the token. If validation passes, the website will write the token to a cookie.&lt;/p&gt;  &lt;p&gt;9. (Not shown on the diagram) On subsequent requests to the website, the website will use the cookie to authenticate and authorize the user.&lt;/p&gt;  &lt;p&gt;10. (Not shown on the diagram) If the user logs out, the website will clear the cookie and send the browser to the redirector. From there, the redirector will send the browser to WLID for logout. This will remove the WLID cookie for that website.&lt;/p&gt;  &lt;h5&gt;Setup Steps IdpRedirector project&lt;/h5&gt;  &lt;p&gt;1. First, you’ll need to have a domain name for the redirector. You can host the redirector in Azure, or your own server. The site needs to have a public address.&lt;/p&gt;  &lt;p&gt;2. After you have the address, go to the Live ID developer portal at &lt;a href="http://go.microsoft.com/fwlink/?LinkID=144070"&gt;http://go.microsoft.com/fwlink/?LinkID=144070&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;3. Setup your WLID developer account. The steps are at &lt;a href="http://msdn.microsoft.com/en-us/library/bb676626.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb676626.aspx&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;The only trick here is to be very careful about the return URL. For this sample, you’ll want to enter http://&amp;lt;yourdomainname&amp;gt;/wlidfederation-handler.aspx, where &amp;lt;yourdomainname&amp;gt; is the hostname + any subdomains for your redirector.&lt;/p&gt;  &lt;p&gt;4. Copy the Application ID and Secret shown below&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSintegrationwithWindowsLiveIDFacebookC_BB97/clip_image004_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSintegrationwithWindowsLiveIDFacebookC_BB97/clip_image004_thumb.jpg" width="504" height="181" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;5. Open the VS solution in the zip at the bottom of this post. &lt;/p&gt;  &lt;p&gt;6. In the WebRedirector project, open the web.config and edit the values below with your Application ID and secret.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:e1eb2505-1e4a-4d9c-b64b-5a88c8984ec5" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="wll_appid"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="yourappid"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;

&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="wll_secret"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="yoursecret"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;p&gt;7. Change the rploginpage and rplogoutpage to the URL for the RelyingPartyWebsite project. I used Cassini in this project, so your port number will likely change.&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:a50059eb-e384-4909-b6bd-b86d08fe9542" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="rploginpage"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="http://localhost:32210/RelyingPartyWebsite/login.aspx"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;

&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="rplogoutpage"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="http://localhost:32210/RelyingPartyWebsite/logout.aspx"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;

&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;p&gt;8. Update the ACS specific settings. &lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:4c16b904-db26-4382-aa36-c0855e39fec0" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="serviceNamespace"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="updateToYourServiceNamespace"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;

&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="clientIssuerKey"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="updateToYourIssuerKey"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;

&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="clientIssuerName"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="updateToYourIssuerName"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;

&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="tokenPolicyKey"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="updateToYourTokenPolicyKey"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;

&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="acsHostName"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="accesscontrol.windows.net"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;

&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="applies_to"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="updateToYourAppliesTo"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;p&gt;9. Upload the project to the domain specified in (3)&lt;/p&gt;

&lt;h5&gt;Setup Steps RelyingPartyWebsite project&lt;/h5&gt;

&lt;p&gt;10. Open the web.config of the RelyingPartyWebsite in VS. Update the appSettings below to the settings for your ACS Service Namespace &amp;amp; the domain of your IdPRedirector.&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:344c6a2b-18ec-41b7-9149-9abd128e2b98" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="idpRedirectHost"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="updateToYourRedirectorHost"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;

&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="serviceNamespace"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="updateToYourServiceNamespace"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;

&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="tokenPolicyKey"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="updateToYourTokenPolicyKey"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;

&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="acsHostName"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="accesscontrol.windows.net"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;

&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="applies_to"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="updateToYourScopeAppliesTo"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;h5&gt;Running The Sample&lt;/h5&gt;

&lt;p&gt;11. Start the RelyingPartyWebsite and browse to the Default.aspx page. You should see something like the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSintegrationwithWindowsLiveIDFacebookC_BB97/clip_image006_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSintegrationwithWindowsLiveIDFacebookC_BB97/clip_image006_thumb.jpg" width="504" height="183" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;12. If you click on the WLID icon, you’ll be redirected to the IdPRedirector, then to WLID. Enter your creds at WLID &amp;amp; you should be redirected back to the IdPRedirector, then to the login.aspx page in RelyingPartyWebsite. If all is well, you’ll see something like:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSintegrationwithWindowsLiveIDFacebookC_BB97/clip_image008_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSintegrationwithWindowsLiveIDFacebookC_BB97/clip_image008_thumb.jpg" width="520" height="185" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here’s the code sample:&lt;/p&gt;
&lt;iframe style="padding-bottom: 0px; background-color: #fcfcfc; padding-left: 0px; width: 98px; padding-right: 0px; height: 115px; padding-top: 0px" title="Preview" marginheight="0" src="http://cid-50fa692ec9deac1c.skydrive.live.com/embedicon.aspx/Code%20Samples/ServerSideWebIdentities.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9922715" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx">Access Control Service</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx">.NET Services</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Azure+Services/default.aspx">Azure Services</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/OAuth+WRAP/default.aspx">OAuth WRAP</category></item><item><title>ACS SAML / ADFS v2 Sample</title><link>http://blogs.msdn.com/justinjsmith/archive/2009/11/14/acs-saml-adfs-v2-sample.aspx</link><pubDate>Sat, 14 Nov 2009 22:55:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9922543</guid><dc:creator>justinjsmith</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/9922543.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=9922543</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=9922543</wfw:comment><description>&lt;p&gt;The November 2009 CTP of ACS integrates with Active Directory Federation Server v2. ACS can act as a bridge between enterprise identity and REST web services. &lt;/p&gt;  &lt;p&gt;The runtime flow is pretty simple (shown below).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSSAMLADFSv2Sample_C9D3/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSSAMLADFSv2Sample_C9D3/image_thumb.png" width="475" height="357" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;At runtime, the client app requests a SAML bearer token from AD FS v2. The easiest way to do this is with Windows Identity Foundation (WIF). &lt;/li&gt;    &lt;li&gt;The client app POSTs the SAML token to ACS over SSL. ACS uses configurable rules to calculate the claims in a Simple Web Token (SWT), creates a SWT, signs it, and returns it to the client app. The protocol for this exchange is OAuth WRAP. &lt;/li&gt;    &lt;li&gt;Next, the client packages the SWT in the HTTP Authorization header and sends it to the REST web service along with whatever payload the REST web service requires. &lt;/li&gt;    &lt;li&gt;Once the REST web service receives the token &amp;amp; payload, it validates the token and checks the claims in the token. The REST web services allows or denies access based on the outcome. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Viola. You have a REST web service that integrates with AD FS v2 via OAuth WRAP and SWT.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Mini AD FS setup (for this scenario only)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;There is some setup required to enable this scenario (other than acquiring an ACS Service Namespace). For starters, you’ll need an AD FS v2 server. Since this requires a domain, I’ve provided a service that replicates the basic token issuing behavior of AD FS (at the bottom of this post).&amp;#160; The only relying party trusted by this service is ACS. &lt;/p&gt;  &lt;p&gt;To setup the service, you’ll need to update the App.config file. Update the “signingCertName” to a cert in your LocalMachine / Personal cert store. Also update the “serviceNamespace” to your ACS service namespace.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:6d071302-13bc-4252-b2cf-8a8f4e28a026" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #FF00FF;"&gt;xml version="1.0" encoding="utf-8" &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;?&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; 
&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;configuration&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; 
  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;appSettings&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; 
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="signingCertName"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="CN=localhost"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; 
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="stsBaseAddress"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="localhost/miniadfs"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; 
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="stsPath"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="Trust/13/Windows"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; 
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="serviceNamespace"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="justinpdcdemo"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; 
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;add &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;key&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="acsHostname"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="accesscontrol.windows.net"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; 
  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;appSettings&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; 
&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;configuration&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;p&gt;You’ll also have to setup SSL for your IIS install (&lt;a title="http://learn.iis.net/page.aspx/144/how-to-setup-ssl-on-iis-70/" href="http://learn.iis.net/page.aspx/144/how-to-setup-ssl-on-iis-70/"&gt;http://learn.iis.net/page.aspx/144/how-to-setup-ssl-on-iis-70/&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;You’ll also need to install the WIF RC. Available here: &lt;a title="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=defd2019-a61f-4327-9332-6a4b6103527a#tm" href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=defd2019-a61f-4327-9332-6a4b6103527a#tm"&gt;http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=defd2019-a61f-4327-9332-6a4b6103527a#tm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From there, you should be able to run the service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fed Metadata Setup with ACS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After you have the mini ADFS service running, you’ll want to use the Fed Metadata it publishes to create an issuer in ACS. Also in the sample below is some code that shows you how to programmatically do that.&lt;/p&gt;

&lt;p&gt;If you’d rather use a tool, you can use the Management Browser (&lt;a title="http://code.msdn.microsoft.com/acmbrowser" href="http://code.msdn.microsoft.com/acmbrowser"&gt;http://code.msdn.microsoft.com/acmbrowser&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Simply create a new Issuer, select FedMetadata from the Algorithm drop down, and set the URL of the fed metadata server. In the miniADFS server, that URL is &lt;a title="https://localhost/LocalADFSv2/FederationMetadata/2007-06/FederationMetadata.xml" href="https://localhost/LocalADFSv2/FederationMetadata/2007-06/FederationMetadata.xml"&gt;https://localhost/LocalADFSv2/FederationMetadata/2007-06/FederationMetadata.xml&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSSAMLADFSv2Sample_C9D3/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSSAMLADFSv2Sample_C9D3/image_thumb_2.png" width="566" height="397" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating a Scope &amp;amp; Rule for the new Issuer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next, you’ll want to create a scope and a rule that refers to that issuer. The sample at the bottom of this post uses a scope with an applies_to URI of &lt;a href="http://localhost/samltest"&gt;http://localhost/samltest&lt;/a&gt;. You can use the Management Browser to create one.&lt;/p&gt;

&lt;p&gt;With the scope in place, we can create a rule. All rules require the name of the Issuer and a claim type in the antecedent. When you create an Issuer using Fed Metadata, the Issuer name is fixed in the Fed Metadata. My MiniADFS server uses an issuer name of &lt;a title="https://localhost/miniadfs/Trust/13/Windows" href="https://localhost/miniadfs/Trust/13/Windows"&gt;https://localhost/miniadfs/Trust/13/Windows&lt;/a&gt;. It also spits out claims of type &lt;a title="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" href="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"&gt;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;With that data, you can create a Passthrough rule. Passthrough rules basically countersign the input claims. In this case, a passthrough rule would countersign any &lt;a title="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" href="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"&gt;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name&lt;/a&gt; claim issued by the issuer &lt;a title="https://localhost/miniadfs/Trust/13/Windows" href="https://localhost/miniadfs/Trust/13/Windows"&gt;https://localhost/miniadfs/Trust/13/Windows&lt;/a&gt;. The consequent of the rule can be of any type you choose. To keep the token compact, I’ll use a claim type of “name”.&lt;/p&gt;

&lt;p&gt;You can set all this up using the management browser, as shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSSAMLADFSv2Sample_C9D3/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/ACSSAMLADFSv2Sample_C9D3/image_thumb_3.png" width="590" height="416" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Acquiring A SAML Token&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With the Issuer, Scope, and Rule setup, let’s get a SAML token using WIF (the RC). The code for doing this is in the SAMLClient project from the code sample in this post. The WIF code is pretty straightforward:&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:32e2348c-5920-49e6-8eba-1e0bd80f9e39" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;private&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;static&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; GetSAMLToken()
{
    WSTrustChannelFactory trustChannelFactory &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt;
        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; WSTrustChannelFactory(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; WindowsWSTrustBinding(SecurityMode.TransportWithMessageCredential),
            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; EndpointAddress(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; Uri(samlUrl)));

    trustChannelFactory.TrustVersion &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; TrustVersion.WSTrust13;

    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;try&lt;/span&gt;&lt;span style="color: #000000;"&gt;
    {
        RequestSecurityToken rst &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt;
            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; RequestSecurityToken(WSTrust13Constants.RequestTypes.Issue, WSTrust13Constants.KeyTypes.Bearer);
        rst.AppliesTo &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; EndpointAddress(acsUrl);
        rst.TokenType &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; Microsoft.IdentityModel.Tokens.SecurityTokenTypes.Saml2TokenProfile11;

        WSTrustChannel channel &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; (WSTrustChannel)trustChannelFactory.CreateChannel();
        GenericXmlSecurityToken token &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; channel.Issue(rst) &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;as&lt;/span&gt;&lt;span style="color: #000000;"&gt; GenericXmlSecurityToken;
        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; tokenString &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; token.TokenXml.OuterXml;
        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; tokenString;
    }
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;finally&lt;/span&gt;&lt;span style="color: #000000;"&gt;
    {
        trustChannelFactory.Close();
    }
}&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
The only trick is to ensure you are using the Bearer key type (Yes, you can use WIF to request a Bearer token).

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using the SAML token to get a SWT&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next, you can use the SAML token to request a SWT from ACS:&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:d69a6633-27db-4115-8b41-f6bb2f78804e" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;private&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;static&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; SendSAMLTokenToACS(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; samlToken)
{
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;try&lt;/span&gt;&lt;span style="color: #000000;"&gt;
    {
        WebClient client &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; WebClient();
        client.BaseAddress &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; acsUrl;

        NameValueCollection parameters &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; NameValueCollection();
        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; ensure the applies_to URI is created in your ACS
        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; service namespace&lt;/span&gt;&lt;span style="color: #008000;"&gt;
&lt;/span&gt;&lt;span style="color: #000000;"&gt;        parameters.Add(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;applies_to&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;http://localhost/samltest&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;);
        parameters.Add(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;wrap_SAML&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;, samlToken);

        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;byte&lt;/span&gt;&lt;span style="color: #000000;"&gt;[] responseBytes &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; client.UploadValues(&lt;/span&gt;&lt;span style="color: #800000;"&gt;""&lt;/span&gt;&lt;span style="color: #000000;"&gt;, parameters);
        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; response &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; Encoding.UTF8.GetString(responseBytes);

        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; response
            .Split(&lt;/span&gt;&lt;span style="color: #800000;"&gt;'&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color: #800000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;)
            .Single(value &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; value.StartsWith(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;wrap_token=&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;, StringComparison.OrdinalIgnoreCase))
            .Split(&lt;/span&gt;&lt;span style="color: #800000;"&gt;'&lt;/span&gt;&lt;span style="color: #800000;"&gt;=&lt;/span&gt;&lt;span style="color: #800000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;)[&lt;/span&gt;&lt;span style="color: #800080;"&gt;1&lt;/span&gt;&lt;span style="color: #000000;"&gt;];
    }
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;catch&lt;/span&gt;&lt;span style="color: #000000;"&gt; (WebException wex)
    {
        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; value &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; StreamReader(wex.Response.GetResponseStream()).ReadToEnd();
        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;throw&lt;/span&gt;&lt;span style="color: #000000;"&gt;;
    }
}&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Viola! That’s all there is.&lt;/p&gt;

&lt;p&gt;Here’s the full code sample – Let me know any feedback you have…&lt;/p&gt;
&lt;iframe style="padding-bottom: 0px; background-color: #fcfcfc; padding-left: 0px; width: 98px; padding-right: 0px; height: 115px; padding-top: 0px" title="Preview" marginheight="0" src="http://cid-50fa692ec9deac1c.skydrive.live.com/embedicon.aspx/Code%20Samples/ACSSamlDemo.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9922543" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Services+in+the+Cloud/default.aspx">Services in the Cloud</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx">Access Control Service</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx">.NET Services</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Azure+Services/default.aspx">Azure Services</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/OAuth+WRAP/default.aspx">OAuth WRAP</category></item><item><title>Web Resource Authorization Protocol (WRAP) and Simple Web Token (SWT) on google groups</title><link>http://blogs.msdn.com/justinjsmith/archive/2009/11/05/web-resource-authorization-protocol-wrap-and-simple-web-token-swt-on-google-groups.aspx</link><pubDate>Fri, 06 Nov 2009 00:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9918315</guid><dc:creator>justinjsmith</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/9918315.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=9918315</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=9918315</wfw:comment><description>&lt;P&gt;The Access Control Service uses a new community protocol and format that are now posted on google groups: &lt;A title=http://groups.google.com/group/wrap-wg href="http://groups.google.com/group/wrap-wg" mce_href="http://groups.google.com/group/wrap-wg"&gt;&lt;STRIKE&gt;http://groups.google.com/group/wrap-wg&lt;/STRIKE&gt;&lt;/A&gt;&amp;nbsp;&lt;A href="http://groups.google.com/group/oauth-wrap-wg"&gt;http://groups.google.com/group/oauth-wrap-wg&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Check em out. If you are a security geek, it’s worth the read.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9918315" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Services+in+the+Cloud/default.aspx">Services in the Cloud</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/REST/default.aspx">REST</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx">Access Control Service</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx">.NET Services</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Azure+Services/default.aspx">Azure Services</category></item><item><title>Access Control Service and ADFS v2 demo</title><link>http://blogs.msdn.com/justinjsmith/archive/2009/10/07/access-control-service-and-adfs-v2-demo.aspx</link><pubDate>Wed, 07 Oct 2009 14:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9904300</guid><dc:creator>justinjsmith</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/9904300.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=9904300</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=9904300</wfw:comment><description>&lt;P&gt;In my last post I outlined the changes that were coming in the Access Control Service. Since that post, I’ve received many questions about how ACS will integrate with ADFS v2. Below is a link to a simple demo I put together to highlight this very cool integration point (video on Channel 9).&lt;/P&gt;
&lt;P&gt;&lt;A href="http://channel9.msdn.com/posts/justinjsmith/Access-Control-Service-and-ADFS-v2-Integration/"&gt;http://channel9.msdn.com/posts/justinjsmith/Access-Control-Service-and-ADFS-v2-Integration/&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9904300" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx">Access Control Service</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx">.NET Services</category></item><item><title>Mix 09 Deck</title><link>http://blogs.msdn.com/justinjsmith/archive/2009/04/28/mix-09-deck.aspx</link><pubDate>Tue, 28 Apr 2009 17:53:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9573657</guid><dc:creator>justinjsmith</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/9573657.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=9573657</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=9573657</wfw:comment><description>&lt;p&gt;For some reason the slide deck I presented at Mix didn’t show up on the Mix 09 website. If you are interested in the deck, see the link below.&lt;/p&gt; &lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-50fa692ec9deac1c.skydrive.live.com/embedrowdetail.aspx/Blog/ACSMix-justinsm%20v9.pptx" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9573657" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Services+in+the+Cloud/default.aspx">Services in the Cloud</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx">Access Control Service</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx">.NET Services</category></item><item><title>Interesting article on Azure Services</title><link>http://blogs.msdn.com/justinjsmith/archive/2009/03/26/interesting-article-on-azure-services.aspx</link><pubDate>Thu, 26 Mar 2009 11:20:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9510082</guid><dc:creator>justinjsmith</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/9510082.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=9510082</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=9510082</wfw:comment><description>&lt;p&gt;Today I caught up on some press material on Azure Services. For those that haven’t seen it, the picture version of Azure Services is below:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="azure" border="0" alt="azure" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/InterestingarticleonAzureServices_12CD/azure_3.jpg" width="485" height="229" /&gt;&lt;/p&gt;  &lt;p&gt;One article published in late February popped out at me: &lt;a href="http://blogs.zdnet.com/microsoft/?p=2173" target="_blank"&gt;http://blogs.zdnet.com/microsoft/?p=2173&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Among other things, this article brings good questions regarding how aligned and integrated the Azure Services platform is today. A quote from the article:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“Our engineering efforts are fully aligned with Red Dog now,” said Shewchuk. “We expect them (Red Dog) to be available with a fully integrated developer experience” upon which CSD and its customers can count when working with .Net Services, SQL Data Services and other components.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;To be clear, the end results of this engineering alignment aren’t fully apparent yet. As John indicates, we are working on it.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9510082" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx">Access Control Service</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx">.NET Services</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Azure+Services/default.aspx">Azure Services</category></item><item><title>Federated website sample</title><link>http://blogs.msdn.com/justinjsmith/archive/2009/02/12/federated-website-sample.aspx</link><pubDate>Fri, 13 Feb 2009 01:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9416046</guid><dc:creator>justinjsmith</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/9416046.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=9416046</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=9416046</wfw:comment><description>&lt;P&gt;The Geneva Framework FAM is the&amp;nbsp;simplest way to experience ACS and ASP.NET. My friends in platform evangelism wrote a cool app that uses ACS, LiveID, and the Geneva Framework. It's called issuetracker, and I recommend checking it out: &lt;A href="http://www.codeplex.com/azureissuetracker" mce_href="http://www.codeplex.com/azureissuetracker"&gt;http://www.codeplex.com/azureissuetracker&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9416046" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx">Access Control Service</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx">.NET Services</category></item><item><title>Access Control Service - Common Interaction Model</title><link>http://blogs.msdn.com/justinjsmith/archive/2009/01/16/access-control-service-common-interaction-model.aspx</link><pubDate>Fri, 16 Jan 2009 20:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9329645</guid><dc:creator>justinjsmith</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/9329645.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=9329645</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=9329645</wfw:comment><description>&lt;p&gt;In my &lt;a href="http://blogs.msdn.com/justinjsmith/archive/2008/11/06/access-control-service-a-simple-scenario.aspx"&gt;previous post&lt;/a&gt; I described at a high level a simple scenario that leverages the Access Control Service. Now I'd like to describe the interactions between messaging participants and the .NET Access Control Service.&lt;/p&gt;  &lt;p&gt;Recall the scenario: a multi-tenant payroll application is running in the cloud - it uses the Access Control Service to simplify federation with enterprise identity providers and handle RBAC processing.&lt;/p&gt;  &lt;p&gt;The interaction pattern for this scenario is shown below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/AccessControlServiceCommonInteractionMod_C5A4/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="405" alt="image" src="http://blogs.msdn.com/blogfiles/justinjsmith/WindowsLiveWriter/AccessControlServiceCommonInteractionMod_C5A4/image_thumb.png" width="644" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h5&gt;Step 0&lt;/h5&gt;  &lt;p&gt;Before using the ACS, the payroll app (called Relying Party in the diagram) must establish a trust with ACS. This is done via a public key certificate exchange. The Relying Party administrator or developer defines or obtains a certificate from the certificate authority of it's choosing, then uploads the public key certificate to ACS. &lt;/p&gt;  &lt;h5&gt;Step 1&lt;/h5&gt;  &lt;p&gt;Next, the Relying Party administrator or developer will define access control rules in ACS. As indicated in &lt;a href="http://blogs.msdn.com/justinjsmith/archive/2008/11/06/access-control-service-a-simple-scenario.aspx"&gt;my earlier post&lt;/a&gt;, the content of the rules is up to the administrator or developer. When this step is completed, ACS is setup and ready for use.&lt;/p&gt;  &lt;h5&gt;Step 2&lt;/h5&gt;  &lt;p&gt;The requestor sends a request for a token (Request for Security Token or RST) to ACS. An RST almost always contains claims (eg username / password, or another token issued from an identity provider). &lt;/p&gt;  &lt;h5&gt;Step 3&lt;/h5&gt;  &lt;p&gt;ACS then checks the claims in the RST. It then uses the input claims to determine the claims that will be sent in the RST response (called RSTR). Consider a simple rule: (Input) Username foo –&amp;gt; (Output) Role Administrator. If the input claim is Username foo, then the output claim is Role Administrator. ACS simply chains these rules together and calculates the output claim set.&lt;/p&gt;  &lt;h5&gt;Step 4&lt;/h5&gt;  &lt;p&gt;After the output claim set is determined, the claims are packaged into a SAML token and returned to the requestor. The token is signed with the ACS certificate and encrypted with the certificate used in step 0. There’s a little more to it than that, because the RP has to be able to differentiate its ACS STS from other ACS STSs. This will surely be a subsequent topic.&lt;/p&gt;  &lt;h5&gt;Step 5&lt;/h5&gt;  &lt;p&gt;The requestor then sends the token to the Relying Party along with a payload of its choosing.&lt;/p&gt;  &lt;h5&gt;Step 6&lt;/h5&gt;  &lt;p&gt;Upon receipt of the token + payload, the Relying Party verifies / validates the token, checks the claims in the token, then processes the payload accordingly. Concretely this means that the Relying Party verifies the token signature &amp;amp; decrypts the token. If the token signature / encryption keys are OK, the Relying Party then checks the claims in the token. If that endpoint or operation on the Relying Party requires Administrative privileges, then the token must contain an Administrator claim. Think of it like a simple toll gate. If the correct claim is present, the call proceeds. If not, then the call fails.&lt;/p&gt;  &lt;h5&gt;Claims Transformer&lt;/h5&gt;  &lt;p&gt;At a high level, ACS receives input claims and transforms them into output claims. We simplify these types of transformations into rules, and provide customers the ability to define these rules on a portal or through a simple API.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9329645" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Services+in+the+Cloud/default.aspx">Services in the Cloud</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx">Access Control Service</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx">.NET Services</category></item><item><title>Access Control Service - A Simple Scenario</title><link>http://blogs.msdn.com/justinjsmith/archive/2008/11/06/access-control-service-a-simple-scenario.aspx</link><pubDate>Fri, 07 Nov 2008 10:42:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9051762</guid><dc:creator>justinjsmith</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/9051762.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=9051762</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=9051762</wfw:comment><description>&lt;p&gt;To the already initiated claims disciples, the Access Control Service is a multi-tenant Resource STS. The behavior of each STS is determined by simple rules - the rules control how each STS &lt;em&gt;&lt;strong&gt;transforms claims&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;To those not already initiated in the claims methodology, the previous definition may seem a bit obtuse. If that's the case, then consider a simple scenario:&lt;/p&gt;  &lt;h5&gt;Background&lt;/h5&gt;  &lt;p&gt;Let's say you work for a software vendor (Foo) that sells a web application (how about employee payroll management) to businesses. You have an existing on-premise offering and an existing install base. This version of your software integrates with customer identity providers (e.g. Active Directory, Tivoli, etc.). &lt;/p&gt;  &lt;p&gt;Customer administrators can allow other employees access to the payroll system - this is driven by group membership (e.g. Domain Users have access). Internally the application uses a set of pre-defined roles, and assigns permissions based on role membership. As an example, consider the following simple model:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Active Directory Group= HR Payroll --&amp;gt; Application Role = Administrator&lt;/p&gt;    &lt;p&gt;Application Role = Administrator --&amp;gt; Permission = CreatePayroll&lt;/p&gt;    &lt;p&gt;Application Role = Administrator --&amp;gt; Permission = PrintPayrollChecks&lt;/p&gt;    &lt;p&gt;... &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This approach is known as &lt;a href="http://en.wikipedia.org/wiki/Role-Based_Access_Control"&gt;Role Bases Access Control (RBAC)&lt;/a&gt;. It's very simple, powerful, and very common.&lt;/p&gt;  &lt;p&gt;Given that Foo's existing offering is on-premise it works well. Initial setup requires some basic plumbing with a &lt;strong&gt;&lt;em&gt;single&lt;/em&gt;&lt;/strong&gt; on-premise identity provider and a bit of configuration by the application administrator.&lt;/p&gt;  &lt;h5&gt;The Winds of Change&lt;/h5&gt;  &lt;p&gt;Some of your existing customers and many prospects are asking for a hosted / cloud version of your payroll application. As your team considers options, it becomes apparent that a good long term approach is to modify the existing on-premise application to be multi-tenant. Modifying a single tenant application to be multi-tenant isn't a joke, but customers are demanding it, so you proceed.&lt;/p&gt;  &lt;p&gt;One of the things your team realizes pretty quickly is that the RBAC model in the on-premise application has to change a bit. The core concept of mapping groups to roles to permissions appears to still be viable, but now there are multiple identity providers. Your application now has to be able to differentiate Bar Corporation Groups from Baz Corporation Groups.&lt;/p&gt;  &lt;p&gt;Luckily most of the software vendors that sell identity providers have built versions of their identity providers that will expose groups and other identity attributes outside of the corporate LAN. I believe that Microsoft's offering in this area is outstanding (Geneva Server, Geneva Framework, Microsoft Services Connector and the Federation Gateway - see &lt;a href="http://www.identityblog.com/"&gt;Kim Cameron's blog&lt;/a&gt; for fantastic details). Concretely, this means that the hosted, multi-tenant version of your application can federate with lots of different corporate identity providers.&lt;/p&gt;  &lt;h5&gt;The Access Control Service&lt;/h5&gt;  &lt;p&gt;There is still a problem, however. You'll have to add quite a bit of code to your application to accept and parse tokens from these identity providers. To top it off, you'll have to make it pretty flexible and configurable. This is where the Access Control Service shines. In a nutshell, it is a service that simplifies interactions with any standards based identity provider, and allows you to define rules that transform Groups to Application Roles to Application Permissions.&lt;/p&gt;  &lt;p&gt;To put it another way, your application won't have to directly interact with any identity providers. It can trust tokens from the Access Control Service. The Access Control Service will handle the gory details of decrypting, verifying and parsing tokens, extracting Groups (or other identity attributes) from tokens, and mapping Groups to Application Roles to Permissions. The end result is a single sign-on experience for your customers, and a simplified code base. &lt;/p&gt;  &lt;p&gt;Up next - the common interaction model of the Access Control Service &amp;amp; why claims disciples call it a &lt;em&gt;&lt;strong&gt;claims transformer&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9051762" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Access+Control+Service/default.aspx">Access Control Service</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Services/default.aspx">.NET Services</category></item></channel></rss>