<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Running With Elevated Privileges</title>
	<atom:link href="http://www.dannyjessee.com/blog/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dannyjessee.com/blog</link>
	<description>Thoughts and observations from a SharePoint developer</description>
	<lastBuildDate>Mon, 20 Feb 2012 20:26:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using LinkedIn as an Identity Provider for SharePoint 2010</title>
		<link>http://www.dannyjessee.com/blog/index.php/2012/02/using-linkedin-as-an-identity-provider-for-sharepoint-2010/</link>
		<comments>http://www.dannyjessee.com/blog/index.php/2012/02/using-linkedin-as-an-identity-provider-for-sharepoint-2010/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 20:11:40 +0000</pubDate>
		<dc:creator>Danny Jessee</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Claims]]></category>
		<category><![CDATA[LinkedIn]]></category>
		<category><![CDATA[Security Token Service]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[STS]]></category>
		<category><![CDATA[trusted identity provider]]></category>
		<category><![CDATA[users]]></category>

		<guid isPermaLink="false">http://www.dannyjessee.com/blog/?p=181</guid>
		<description><![CDATA[Those of you who have seen me speak at a user group or SharePoint Saturday event recently know how much I love Windows Azure AppFabric&#8217;s Access Control Services and how easy ACS makes it to configure SharePoint 2010 to allow users to log in with OpenID identity providers such as Facebook, Google, Yahoo!, and Windows [...]]]></description>
			<content:encoded><![CDATA[<p>Those of you who have seen me speak at a user group or SharePoint Saturday event recently know how much I love Windows Azure AppFabric&#8217;s <a href="https://www.windowsazure.com/en-us/home/tour/access-control/">Access Control Services</a> and how easy ACS makes it to configure SharePoint 2010 to allow users to log in with OpenID identity providers such as Facebook, Google, Yahoo!, and Windows Live. <strong>But what about LinkedIn?</strong> While LinkedIn isn&#8217;t an OpenID provider per se, numerous sites on the web allow users to sign in using their LinkedIn account credentials via <a href="http://developer.linkedin.com/documents/authentication">OAuth</a>. When the subject of external identity providers for a future version of the <a href="http://sugdc.org">SharePoint User Group of Washington, DC site</a> came up during <a href="http://www.slideshare.net/dannyjessee/sharepoint-2010claimsbased-identity-facebook-and-the-cloud">my recent presentation</a> there, the audience overwhelmingly agreed that LinkedIn was the most &#8220;professional&#8221; identity provider to integrate (and certainly one that most SharePoint professionals would feel more comfortable using than Facebook). There was only one problem…Azure AppFabric ACS does not natively support LinkedIn as an identity provider. What was I to do?</p>
<p>As one astute observer pointed out during my presentation, ACS is not required to configure SharePoint 2010 to interact with any external identity provider. While ACS greatly simplifies the management and configuration required to set up an external identity provider and its associated claim rules, it is possible to write code that leverages a custom STS (Security Token Service) to manage all of this without involving Azure at all.</p>
<h1>Getting Started</h1>
<p>Luckily for me, the vast majority of the technical &#8220;heavy lifting&#8221; required to accomplish this integration had already been done by <a href="https://twitter.com/">Travis Nielsen</a>. In <a href="http://blogs.pointbridge.com/Blogs/nielsen_travis/Pages/Post.aspx?_ID=40">this blog post</a>, Travis details the steps (and development prerequisites, including the <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c148b2df-c7af-46bb-9162-2c9422208504&amp;utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:+MicrosoftDownloadCenter+(Microsoft+Download+Center)&amp;utm_content=Google+Reader">Windows Identity Foundation SDK 4.0</a>) required to integrate SharePoint 2010 with Facebook as an identity provider using a custom STS (and without using Azure ACS). The steps for integrating LinkedIn are basically the same as they are for Facebook. Below I will detail how configuring the two identity providers differs.</p>
<h2>C# OAuth Class for LinkedIn</h2>
<p>I was preparing to have to adapt the Facebook OAuth class Travis had found to work with LinkedIn. Fortunately, I stumbled upon a <a href="https://developer.linkedin.com/thread/1190">C# OAuth class for LinkedIn</a> that had already been developed by Fatih YASAR. All credit for this aspect of the solution belongs to him.</p>
<h2>Creating the Application</h2>
<p>Much like configuring Facebook as an identity provider requires the creation of an &#8220;application&#8221; within Facebook, LinkedIn requires the creation of an application as well.</p>
<p>Anyone with a LinkedIn account can create an application through the LinkedIn Developer Network.</p>
<ol>
<li>Go to <a href="https://www.linkedin.com/secure/developer">https://www.linkedin.com/secure/developer</a>.<br />
<img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked1.png" alt="" /></li>
<li>Click <strong>Add New Application</strong>. Fill out the form to register your new application. Many of the fields on the form are optional, but you will need to specify a value for <strong>JavaScript API Domain</strong> (even though it appears to be optional on the form; you can just enter the root URL to your SharePoint web application here) in order to submit the form. Any values you enter here can be changed later on.</li>
<li>Press <strong>Add Application</strong>. The following screen will confirm creation of your LinkedIn application.<br />
<img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked2.png" alt="" /></li>
<li>As with Facebook, it is important that you take note of the <strong>API Key </strong>and <strong>Secret Key </strong>values that are displayed. We will need to use these values in our code. Press <strong>Done</strong>. We will return to our application setup when we have identified the SharePoint 2010 web application with which we want to integrate LinkedIn.</li>
</ol>
<h2>Customizing the STS</h2>
<p>First, add the <strong>oAuthBase2 </strong>and <strong>oAuthLinkedIn</strong> classes from Fatih YASAR to the <strong>App_Code </strong>folder of your STS project. You shouldn&#8217;t need to make any changes to the two .cs files, but you will notice that the <strong>oAuthLinkedIn</strong> class expects to find your <strong>API Key </strong>and <strong>Secret Key</strong> values in the <strong>&lt;appSettings&gt;</strong> of your STS&#8217;s Web.config, so add them there:</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked3.png" alt="" /></p>
<p>While we are here, it&#8217;s worth noting that the STS is configured by default to use the certificate with <strong>CN=STSTestCert</strong> to sign the SAML tokens it generates containing the claims we configure it to send. This certificate is installed as part of the Windows Identity Framework SDK. We will need to export this certificate so that we can configure SharePoint 2010 to use our custom STS as a Trusted Identity Provider and add this certificate to its trusted certificate store. I was able to find and export this certificate by loading the <strong>Certificates – Current User </strong>snap-in and navigating to <strong>Trusted People &gt; Certificates</strong>:</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked4.png" alt="" /></p>
<p>It goes without saying that you would not want to use this certificate in a production environment. Remember to update the <strong>SigningCertificateName </strong>in your STS&#8217;s Web.config to match the name of your production certificate.</p>
<p>Back to the STS code…I tied everything together in <strong>Login.aspx.cs</strong>. When the login page first loads (with no <strong>oauth_token</strong> value present in the query string), the user is redirected to the appropriate authorization link (hosted by LinkedIn). Once the user has an access token from LinkedIn, we are able to populate a series of claims for that user. Much like Travis did with Facebook, I make a call to the LinkedIn API to get profile information associated with the current user and define a series of output claims based on this information. The claims I have defined are:</p>
<ul>
<li><strong>Name</strong> – concatenated first and last name</li>
<li><strong>Webpage </strong>– the LinkedIn user&#8217;s profile URL</li>
<li><strong>NameIdentifier</strong> – the LinkedIn user&#8217;s profile ID (parsed from the profile URL)</li>
<li><strong>GivenName </strong>and <strong>Surname </strong>(just because I could)</li>
</ul>
<p>Below is the code that I used. In a production environment, you will want to include better error handling and more robust XML parsing!</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked5.png" alt="" /></p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked6.png" alt="" /></p>
<p>Also, don&#8217;t forget to update the <strong>GetOutputClaimsIdentity()</strong> function in the <strong>CustomSecurityTokenService.cs </strong>class to make use of the output claims that are stored in a Session variable:</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked7.png" alt="" /></p>
<h2>Deploying the Custom STS and Updating the OAuth Redirect URL for the LinkedIn Application</h2>
<p>Following the steps outlined in Travis&#8217; blog post will give you an ASP.NET 4.0 web site that serves as your Security Token Service. You must deploy or publish this web site such that your SharePoint users will have access to it. For the purposes of this blog post, I have set up an IIS web site at <strong>http://sts.contoso.com </strong>that points to my custom STS.</p>
<p>Once I have deployed my STS, I need to return to my LinkedIn application setup and provide the URL to this STS as the OAuth Redirection URL, with a couple of important query string parameters appended:</p>
<ol>
<li>Return to <a href="https://www.linkedin.com/secure/developer">https://www.linkedin.com/secure/developer</a> and click the name of your application.</li>
<li>Near the bottom of the form, enter the URL to the <strong>Default.aspx</strong> page at the root of your STS site with the following query string:<br />
<strong>?wa=wsignin1.0&amp;wtrealm=http%3a%2f%2fintranet.contoso.com%2f_trust%2f<br />
</strong>These parameters are defined in greater detail <a href="http://msdn.microsoft.com/en-us/library/cc236491%28v=prot.10%29.aspx">here</a>. The <strong>wtrealm</strong> parameter should be the URL-encoded value of your SharePoint web application with <strong>/_trust/</strong> (%2f_trust%2f) appended.<br />
<img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked8.png" alt="" /></li>
<li>Press <strong>Save </strong>to update your application.</li>
</ol>
<h1>Configuring the Trusted Identity Provider for SharePoint 2010</h1>
<p>We will configure our LinkedIn Trusted Identity Provider for SharePoint 2010 to map the following claim types that are included in the SAML tokens we receive from our custom STS:</p>
<ul>
<li><strong>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier</strong> (LinkedIn profile ID)</li>
<li><strong>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name</strong> (First and last name)</li>
<li><strong>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage</strong> (LinkedIn profile URL)</li>
</ul>
<p>This is done by running the following PowerShell script:</p>
<blockquote><p>$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2(&#8220;c:\STSTestCert.cer&#8221;)</p>
<p>$map1 = New-SPClaimTypeMapping &#8220;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier&#8221; -IncomingClaimTypeDisplayName &#8220;LinkedIn ID&#8221; -LocalClaimType &#8220;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn&#8221;</p>
<p>$map2 = New-SPClaimTypeMapping -IncomingClaimType &#8220;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name&#8221; -IncomingClaimTypeDisplayName &#8220;Display Name&#8221; -LocalClaimType &#8220;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname&#8221;</p>
<p>$map3 = New-SPClaimTypeMapping -IncomingClaimType &#8220;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage&#8221; -IncomingClaimTypeDisplayName &#8220;LinkedIn URL&#8221; -SameAsIncoming</p>
<p>$realm = &#8220;http://intranet.contoso.com/_trust&#8221;</p>
<p>$signinurl = &#8220;http://sts.contoso.com/&#8221;</p>
<p>New-SPTrustedIdentityTokenIssuer -Name &#8220;LinkedIn&#8221; -Description &#8220;LinkedIn custom STS&#8221; -Realm $realm -ImportTrustCertificate $cert -ClaimsMappings $map1,$map2,$map3 -SignInUrl $signinurl -IdentifierClaim $map1.InputClaimType</p>
<p>New-SPTrustedRootAuthority -Name &#8220;LinkedIn&#8221; -Certificate $cert</p></blockquote>
<p>The script is fairly straightforward. A couple items to note:</p>
<ul>
<li>The <strong>$cert</strong> defined in line 1 is created based on the exported STS signing certificate mentioned previously. In this case, I exported the certificate to my C:\ drive and reference it there.</li>
<li>Because certain claim type mappings are already used by SharePoint (such as <strong>name </strong>and <strong>nameidentifier</strong>), you will see I had to define different <strong>LocalClaimType </strong>values for 2 of my 3 claim mappings.</li>
<li>I use the LinkedIn profile ID (and not the first and last name of the user) as the <strong>IdentifierClaim</strong> because only the profile ID is guaranteed to be unique. I will write some custom code to update the display name property of the <strong>SPUser</strong> objects associated with LinkedIn users so that they see their first and last name (instead of just a 7-digit number) at the top of the screen when they sign in to SharePoint.</li>
</ul>
<p>Running this script will add a Trusted Identity Provider called <strong>LinkedIn</strong> to the list of Trusted Identity Providers that can be added to any web application through Central Administration:</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked9.png" alt="" /></p>
<p>After adding the new Trusted Identity Provider, it helps to define a User Permission policy for the web application that allows any users who authenticate using this Trusted Identity Provider to be authorized to have read access to the web application:</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked10.png" alt="" /></p>
<h1>The Moment of Truth</h1>
<p>Users should now be able to sign in to SharePoint with their LinkedIn accounts. Let&#8217;s give it a shot! Depending on the different authentication providers configured for a given web application, you may or may not see a sign-in page allowing you to choose which credentials to use to log in to SharePoint. We will choose <strong>LinkedIn</strong>:</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked11.png" alt="" /></p>
<p>A series of HTTP redirects will take place. If the user has previously logged in to LinkedIn and has a cookie, that user will not need to enter his/her credentials again and will be presented with the following screen. In this screen, the user is agreeing to allow the LinkedIn application to have access to his or her account information (which consists of name, profile headline, and profile URL):</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked12.png" alt="" /></p>
<p>If the user has not previously logged in to LinkedIn and/or does not have a cookie, the following screen will appear:</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked13.png" alt="" /></p>
<p>As this screen points out, users have the ability to revoke your application&#8217;s permission at any time. Press <strong>Continue</strong> and some more HTTP redirects will take place that should eventually land the user back in SharePoint. I have used Travis Nielsen&#8217;s Claims Web Part on the team site where users log in with LinkedIn. Here you can see the claims mappings we configured earlier and how those claims are presented to SharePoint from our custom STS:</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked14.png" alt="" /></p>
<p>Because we are using the user&#8217;s LinkedIn profile ID as the <strong>nameidentifier</strong> claim, that value initially appears at the top right of the page when the user first signs in:</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked15.png" alt="" /></p>
<p>To improve the personalization experience for the end user, we can write the following code (in a web part, for instance) to update the <strong>DisplayName </strong>property of the <strong>SPUser</strong> to read the value from the <strong>givenname</strong> claim instead:</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked16.png" alt="" /></p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked17.png" alt="" /></p>
<p>There now, that&#8217;s better!</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/02/022012_2011_UsingLinked18.png" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dannyjessee.com/blog/index.php/2012/02/using-linkedin-as-an-identity-provider-for-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Beyond Authentication: Deeper Facebook Integration with SharePoint (with code!)</title>
		<link>http://www.dannyjessee.com/blog/index.php/2012/01/beyond-authentication-deeper-facebook-integration-with-sharepoint-with-code/</link>
		<comments>http://www.dannyjessee.com/blog/index.php/2012/01/beyond-authentication-deeper-facebook-integration-with-sharepoint-with-code/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 21:12:38 +0000</pubDate>
		<dc:creator>Danny Jessee</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[access control services]]></category>
		<category><![CDATA[ACS]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint Saturday]]></category>
		<category><![CDATA[SPSVB]]></category>

		<guid isPermaLink="false">http://www.dannyjessee.com/blog/?p=156</guid>
		<description><![CDATA[I had the privilege of speaking at SharePoint Saturday in Virginia Beach yesterday. This event is of particular significance each year within the community because the first ever SharePoint Saturday was held in Virginia Beach back in 2009 and SPSVB is seen as the &#8220;kickoff&#8221; for a new year of SharePoint Saturdays. As always, I [...]]]></description>
			<content:encoded><![CDATA[<p>I had the privilege of speaking at SharePoint Saturday in Virginia Beach yesterday. This event is of particular significance each year within the community because the first ever SharePoint Saturday was held in Virginia Beach back in 2009 and SPSVB is seen as the &#8220;kickoff&#8221; for a new year of SharePoint Saturdays. As always, I learned so much at this event and had a great time meeting with and getting to know many of the speakers, volunteers, and attendees. I would like to thank each person who gave me 70 minutes of their time yesterday to learn more about Claims-based identity in SharePoint 2010 and see how we can do more than just log in to SharePoint with Facebook. I would especially like to thank those who provided me with feedback. I plan to refine and improve this presentation for future community events, so stay tuned!</p>
<p>Below is the slide deck I used in my session. In addition to introducing Claims-based identity in SharePoint 2010 and detailing some of the things to look out for when working with Claims, it illustrates how to configure Windows Azure AppFabric&#8217;s Access Control Services to support logging in to SharePoint with Facebook accounts. More detailed information about this process can be found <a href="http://msdn.microsoft.com/en-us/library/windowsazure/gg185967.aspx">here</a>.</p>
<div id="__ss_10841282" style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a title="Claims-Based Identity in SharePoint 2010" href="http://www.slideshare.net/dannyjessee/claimsbased-identity-in-sharepoint-2010-10841282" target="_blank">Claims-Based Identity in SharePoint 2010</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/10841282" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="425" height="355"></iframe></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/dannyjessee" target="_blank">Danny Jessee</a></div>
</div>
<h2>But we can do more than just log in…</h2>
<p>Much of the feedback I received yesterday related to the various demonstrations of how I used the <a href="http://facebooksdk.codeplex.com/">Facebook C# SDK</a> to surface data from Facebook in SharePoint (and vice versa) using Facebook&#8217;s <a href="https://developers.facebook.com/docs/reference/api/">Graph API</a>. When it comes to the potential of the integration of Facebook and SharePoint, the sky is truly the limit. The <strong>AccessToken</strong> claim that Facebook includes in the OAuth token it generates will provide your application with access to<em> any data it requests</em> (while still obeying the privacy settings you and everyone in your friends list have in place).</p>
<h2>More about the Facebook C# SDK</h2>
<p>You can download the Facebook C# SDK <a href="http://facebooksdk.codeplex.com/releases/view/78901">here</a>. The &#8220;Assemblies only&#8221; version is all you need to get started, although it is interesting and informative to be able to see the source code. (Having access to the source code helped me troubleshoot <a href="http://www.dannyjessee.com/blog/index.php/2011/12/required-trust-relationships-for-the-facebook-c-sdk-in-sharepoint-2010/">this issue</a> as well.) The SDK includes support for .NET Framework 3.5/4.0 and Silverlight. Obviously, we must use the .NET Framework 3.5 version in conjunction with our SharePoint development. The project is well documented and includes some great examples <a href="http://facebooksdk.codeplex.com/documentation">here</a> and at Prabir&#8217;s blog <a href="http://blog.prabir.me/">here</a>.</p>
<p>Data returned from the Facebook Graph API is in JSON format. To parse this data quickly and efficiently, my project includes the <a href="http://json.codeplex.com/">Json.NET framework</a>.</p>
<p>If you download the source code for my demos <a href="https://skydrive.live.com/?cid=37e17b2e0fea48cb&amp;id=37E17B2E0FEA48CB%21106">here</a>, you will see it includes a series of SharePoint project items. They include:</p>
<h3>ClaimsWebPart</h3>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/01/010812_2112_BeyondAuthe1.png" alt="" /></p>
<p>Largely based on <a href="http://blogs.pointbridge.com/Blogs/nielsen_travis/Pages/Post.aspx?_ID=32">this blog post</a>, the Claims Web Part displays all of the claims included in the logged in user&#8217;s identity token in grid format. I added some Facebook-specific items in here for debugging purposes, such as displaying the user&#8217;s Facebook access token (parsed from the identity token), then using that token and the Facebook C# SDK to get the user&#8217;s current city, hometown, and Facebook user name.</p>
<p>The Claims Web Part is a great troubleshooting/debugging tool for developers and administrators who are new to working with Claims. It is a quick and easy way to verify the claim rules you configured when creating your Trusted Identity Provider are behaving the way they should.</p>
<h3>SilverlightToFacebook</h3>
<p>In my demo, a Silverlight application interfaces with the user&#8217;s webcam and saves snapshots to a SharePoint document library (hat tip to <a href="http://www.mosslover.com/">MossLover</a> for that code). This class contains an event receiver that then takes those photos added to the SharePoint document library and uploads them to Facebook.</p>
<h3>SPSVBDemos</h3>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/01/010812_2112_BeyondAuthe2.png" alt="" /></p>
<p>This web part is the &#8220;dashboard&#8221; I used to do a handful of quick proof-of-concept demos, including the following:</p>
<ul style="margin-left: 54pt;">
<li>Changing the display name of the currently logged in <strong>SPUser </strong>to match the name claim returned by Facebook (instead of the user&#8217;s email address or Claims-encoded username).</li>
<li>Adding information from the user&#8217;s Facebook profile (name, city, birthday, employer, job title, etc.) to a contacts list.</li>
<li>Populating a calendar list with recurring events for all of your friends&#8217; birthdays (based on friends whose privacy settings allow sharing of this information).</li>
<li>Uploading a video from the file system to the user&#8217;s Facebook profile.</li>
</ul>
<h3>StatusUpdateWebPart</h3>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/01/010812_2112_BeyondAuthe3.png" alt="" /></p>
<p>This web part allows the user to update his/her Facebook status directly from SharePoint. Optionally, the user may also include a link (with image, caption, description, etc.) with each status update.</p>
<h3>WeatherWebPart</h3>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2012/01/010812_2112_BeyondAuthe4.png" alt="" /></p>
<p>This web part determines the current user&#8217;s city from his/her Facebook profile, then constructs a request to the URL-driven <a href="http://api.wunderground.com/weather/api/">Weather Underground API</a> to retrieve the current weather conditions in that city. While many of these web parts may only have value in demos, I believe this web part represents a meaningful way for SharePoint site owners to provide a nice personalization experience to end users who log in to SharePoint with Facebook accounts.</p>
<h3>Site Template</h3>
<p>I also created a site template (SPSVB.WSP) that contains the custom lists and web parts I used in my demo. It is included in the code download.</p>
<p>Thanks again to everyone who helped to make SharePoint Saturday Virginia Beach such a great success! If you have any questions or suggestions about this code, please feel free to post them in the comments.</p>
<h2>Download</h2>
<p><a href="https://skydrive.live.com/?cid=37e17b2e0fea48cb&amp;id=37E17B2E0FEA48CB%21106">SPSVB web parts, source code, site template, and required certificates to configure SharePoint trust for Facebook</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dannyjessee.com/blog/index.php/2012/01/beyond-authentication-deeper-facebook-integration-with-sharepoint-with-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Required Trust Relationships for the Facebook C# SDK in SharePoint 2010</title>
		<link>http://www.dannyjessee.com/blog/index.php/2011/12/required-trust-relationships-for-the-facebook-c-sdk-in-sharepoint-2010/</link>
		<comments>http://www.dannyjessee.com/blog/index.php/2011/12/required-trust-relationships-for-the-facebook-c-sdk-in-sharepoint-2010/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 01:39:59 +0000</pubDate>
		<dc:creator>Danny Jessee</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Azure ACS]]></category>
		<category><![CDATA[certificates]]></category>
		<category><![CDATA[DigiCert]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[trust]]></category>

		<guid isPermaLink="false">http://www.dannyjessee.com/blog/index.php/2011/12/required-trust-relationships-for-the-facebook-c-sdk-in-sharepoint-2010/</guid>
		<description><![CDATA[I recently started using the Facebook C# SDK from CodePlex in my efforts to link SharePoint 2010, Claims-Based Identity, Azure ACS, and Facebook into one killer demo for my presentation on Claims-Based Identity that I will be giving at SharePoint Saturday Virginia Beach next month. Without giving too much away, I intend to leverage the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started using the <a href="http://facebooksdk.codeplex.com">Facebook C# SDK from CodePlex</a> in my efforts to link SharePoint 2010, Claims-Based Identity, Azure ACS, and Facebook into one killer demo for my presentation on Claims-Based Identity that I will be giving at <a href="http://sharepointsaturday.org/virginiabeach">SharePoint Saturday Virginia Beach</a> next month.</p>
<p>Without giving too much away, I intend to leverage the <strong>AccessToken</strong> input claim type provided by Facebook through Azure ACS to reach back into the user&#8217;s Facebook profile and obtain more information about the user who has just logged in to SharePoint from Facebook.</p>
<p>After rushing into coding a new web part (as any good developer would), I immediately encountered the following exception upon deployment:</p>
<p><strong>The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.<br />
at FluentHttp.HttpHelper.OpenRead()<br />
at Facebook.FacebookClient.Api(String path, IDictionary`2 parameters, HttpMethod httpMethod, Type resultType)<br />
…<br />
</strong></p>
<p>This error was met with the following corresponding entry in the Event Viewer:</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/12/120411_0139_RequiredTru1.png" alt="" /></p>
<p>In order to resolve this error, it is important to remember that SharePoint 2010 maintains its own certificate store, where separate trusts must be configured and maintained. Even though the root of the certificate chain may already be trusted everywhere else, you will receive this error unless an explicit trust is configured for SharePoint in Central Administration (or through PowerShell).</p>
<p>After much trial and error, I discovered that <strong>two </strong>trusts must be configured to support Facebook. First, go to the <a href="https://www.digicert.com/digicert-root-certificates.htm">DigiCert Root Certificate site</a> and download the following certificates as .cer files:</p>
<ul>
<li>Under Root Certificates: <strong>DigiCert High Assurance EV Root CA</strong></li>
<li>Under Intermediate Certificates: <strong>DigiCert High Assurance CA-3</strong></li>
</ul>
<p>Now that you are armed with these two .cer files, go to Central Administration. Go to <strong>Security</strong>, then under &#8220;General Security,&#8221; choose <strong>Manage Trust</strong>.</p>
<p>For each of the two .cer files, perform the following steps:</p>
<ol>
<li>From the ribbon, select <strong>New</strong>.</li>
<li>In the &#8220;Establish Trust Relationship&#8221; dialog that appears, give each certificate a friendly name. In the &#8220;Root Authority Certificate&#8221; section, press <strong>Browse…</strong> and navigate to each .cer file.</li>
<li>Press <strong>OK.</strong></li>
</ol>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/12/120411_0139_RequiredTru2.png" alt="" /></p>
<p>Perform an <strong>IISRESET</strong> after adding both certificates, and you should be ready to leverage the Facebook C# SDK from SharePoint 2010. Happy coding, and I hope to see you at SPSVB on January 7th!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dannyjessee.com/blog/index.php/2011/12/required-trust-relationships-for-the-facebook-c-sdk-in-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Ensure an SPUser Exists in an Application Page Within an Anonymously Accessible Site</title>
		<link>http://www.dannyjessee.com/blog/index.php/2011/11/ensure-an-spuser-exists-in-an-application-page-within-an-anonymously-accessible-site/</link>
		<comments>http://www.dannyjessee.com/blog/index.php/2011/11/ensure-an-spuser-exists-in-an-application-page-within-an-anonymously-accessible-site/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 22:48:50 +0000</pubDate>
		<dc:creator>Danny Jessee</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[current]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[EnsureUser]]></category>
		<category><![CDATA[logged in user]]></category>
		<category><![CDATA[SPContext]]></category>
		<category><![CDATA[SPUser]]></category>

		<guid isPermaLink="false">http://www.dannyjessee.com/blog/index.php/2011/11/ensure-an-spuser-exists-in-an-application-page-within-an-anonymously-accessible-site/</guid>
		<description><![CDATA[I was recently confronted with a requirement to develop an application page that could retrieve information about the currently logged in user from an external system based on that user&#8217;s email address. Piece of cake, I thought: I would just use the SPContext.Current.Web.CurrentUser object, which contains a string property called Email containing that SPUser&#8216;s email [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently confronted with a requirement to develop an application page that could retrieve information about the currently logged in user from an external system based on that user&#8217;s email address. Piece of cake, I thought: I would just use the <strong>SPContext.Current.Web.CurrentUser </strong>object, which contains a string property called <strong>Email </strong>containing that <strong>SPUser</strong>&#8216;s email address. I would take that string, pass it to the external system, get my information back, and call it a day. There was only one problem: the application page had to run within a site that had anonymous access enabled, and none of the users who would be accessing the page were explicitly assigned any permissions within the site.</p>
<h2>A quick aside about anonymously accessible application pages</h2>
<p>The default &#8220;Application Page&#8221; SPI within Visual Studio 2010 creates a page that inherits from the <strong>LayoutsPageBase</strong> class. A frequent complaint I hear is that an application page is prompting a user to log in even though that page is being accessed from within the context of an anonymously accessible site. If I had wanted my application page to be anonymously accessible, I would have to make the following tweaks to what Visual Studio 2010 gives me by default:</p>
<ul>
<li>First, ensure that anonymous access is enabled for the <strong>Entire Web Site</strong>. I would do this from <strong>Site Actions &gt; Site Permissions </strong>in SharePoint.</li>
<li>Change the page inheritance so that it inherits from the <strong>UnsecuredLayoutsPageBase </strong>class (shown below).</li>
<li>Explicitly override the <strong>AllowAnonymousAccess</strong> property and set its value to <strong>true </strong>(shown below).</li>
</ul>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/112011_2248_EnsureanSPU11.png" alt="" /></p>
<h2>But back to the problem at hand…</h2>
<p>Since I <em>want</em> to force users to log in to access my application page (even with anonymous access enabled at the site level), I will leave the default base class of <strong>LayoutsPageBase</strong>. Can anyone see what problem might arise with my scenario?</p>
<p>It turns out that since none of the users accessing the page were explicitly assigned any permissions within the site (nor belonged to any site groups), <strong>SPContext.Current.Web.CurrentUser</strong> was returning <span style="color: red;"><strong>null</strong></span>!</p>
<p>Fortunately, there is some good news here: even though the <strong>SPContext</strong> may not know who the current user is, the <strong>System.Web.HttpContext</strong> does! The property <strong>this.Context.User.Identity.Name</strong> contains the login name of the current user, which I can then pass to the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.ensureuser.aspx"><strong>SPWeb.EnsureUser()</strong></a> function to create the <strong>SPUser</strong> in the given <strong>SPWeb</strong> based on that login name. The <strong>EnsureUser()</strong> function returns an <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spuser.aspx"><strong>SPUser</strong></a> object that is populated with the email address of the user (along with the other properties of the <strong>SPUser</strong> object such as <strong>LoginName</strong>,<strong> Name</strong>,<strong> ID</strong>,<strong><br />
</strong>etc.)</p>
<p><span style="color: red;"><strong>NOTE:</strong></span> Do NOT try to call <strong>SPWeb.EnsureUser() </strong>in the context of the currently logged in user. It is important to run this code inside a <strong>RunWithElevatedPrivileges()</strong> delegate because the System Account will have the necessary permissions to add the specified user to the <strong>SPWeb</strong>. After all, if the specified user already had permission to do this, we wouldn&#8217;t need to be adding him or her in the first place!</p>
<p>The final code to accomplish everything (with proper error checking and handling omitted for brevity) looks like this:</p>
<p><a href="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/code1.jpg"><img class="alignnone size-full wp-image-143" title="code1" src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/code1.jpg" alt="" width="545" height="469" /></a></p>
<p>Note that I don&#8217;t wrap the entire method with a <strong>RunWithElevatedPrivileges() </strong>delegate or <strong>web.CurrentUser</strong> would return the identity of the System Account, which is definitely not what I want.</p>
<p>Has anyone else encountered a similar scenario and solved the problem differently? Please feel free to discuss in the comments below!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dannyjessee.com/blog/index.php/2011/11/ensure-an-spuser-exists-in-an-application-page-within-an-anonymously-accessible-site/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fun with BCS, External Lists, and PowerShell!</title>
		<link>http://www.dannyjessee.com/blog/index.php/2011/11/fun-with-bcs-external-lists-and-powershell/</link>
		<comments>http://www.dannyjessee.com/blog/index.php/2011/11/fun-with-bcs-external-lists-and-powershell/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 02:35:11 +0000</pubDate>
		<dc:creator>Danny Jessee</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[BCS]]></category>
		<category><![CDATA[business connectivity services]]></category>
		<category><![CDATA[external lists]]></category>
		<category><![CDATA[ID]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SPServiceContext]]></category>
		<category><![CDATA[SPServiceContextScope]]></category>

		<guid isPermaLink="false">http://www.dannyjessee.com/blog/index.php/2011/11/fun-with-bcs-external-lists-and-powershell/</guid>
		<description><![CDATA[A recent question on SharePoint Stack Exchange inspired me to want to learn more about interacting with SharePoint lists using PowerShell, especially external lists created through Business Connectivity Services (BCS) in SharePoint 2010. With my background being more in .NET development using the object model, I was surprised to discover some of the inconsistencies one [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://sharepoint.stackexchange.com/questions/23224/how-to-read-items-in-a-bcs-external-list-with-powershell">recent question on SharePoint Stack Exchange</a> inspired me to want to learn more about interacting with SharePoint lists using PowerShell, especially external lists created through Business Connectivity Services (BCS) in SharePoint 2010. With my background being more in .NET development using the object model, I was surprised to discover some of the inconsistencies one sees when interacting with an external list in PowerShell (compared with a standard out-of-the-box list).
</p>
<p>For the purposes of this discussion, I will assume that you are familiar with <a href="http://msdn.microsoft.com/en-us/library/ee557243.aspx">how to use SharePoint Designer to create an external content type mapped to a SQL Server data source</a>. From there, <a href="http://msdn.microsoft.com/en-us/library/ee558778.aspx">I created an external list for this external content type</a>.
</p>
<p>What initially made my learning journey such a confusing one was that the SQL Server table I used as the data source for my external content type contained a column named <strong>ID</strong> of type <strong>integer</strong>. It is possible that any external line-of-business (LOB) data source you consume through BCS may have a similar column as well. The values I initially inserted into the database table had auto-increment values of 1, 2, 3, etc. This enabled me to interact with the items in my external list using the following PowerShell syntax:
</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111611_0234_FunwithBCSE1.png" alt=""/>
	</p>
<p>The first two lines may be unfamiliar to those of you who have not programmed with BCS before. With BCS, it is necessary to establish an <strong>SPServiceContext</strong> within an <strong>SPServiceContextScope </strong>that represents the HTTP context of the Business Data Connectivity Service.
</p>
<p>If you ever see the following error:
</p>
<p><span style="color:red"><strong><span style="font-size:12pt">&#8220;The shim execution failed unexpectedly &#8211; Proxy creation failed. Default context not found.&#8221;</span><span style="font-size:10pt"><br />
				</span></strong></span></p>
<p>Make sure you instantiate an <strong>SPServiceContext </strong>within an <strong>SPServiceContextScope </strong>as I have above.
</p>
<p>It appears that there are some things you can do <em>without</em> properly obtaining the <strong>SPServiceContext</strong> within an <strong>SPServiceContextScope</strong> (such as enumerating the <strong>Fields</strong> collection of the external list). That said, the safest approach appears to be to always instantiate the <strong>SPServiceContextScope </strong>as shown above. If anyone can shed any additional light on why this is, please feel free to share in the comments below!
</p>
<h1>Fun Fact: An ID is not always an ID!<br />
</h1>
<p>Here is my external list, viewed through the browser:
</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111611_0234_FunwithBCSE2.png" alt=""/>
	</p>
<p>As you can see, the list contains an <strong>ID</strong> column with <strong>integer</strong> values, mapped directly to the similarly configured column in my SQL Server database table:
</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111611_0234_FunwithBCSE3.png" alt=""/>
	</p>
<p>This allows me to run the following script to obtain access to the item with an ID value of 2:
</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111611_0234_FunwithBCSE4.png" alt=""/>
	</p>
<p>Seems reasonable, right? After all, the second item we insert into a new out-of-the-box SharePoint list would be assigned an ID value of 2 as well (without us having to do anything to make it happen). And since I was able to call <strong>GetItemById(2)</strong>, that must mean the ID property of the list item is 2, right?
</p>
<p>Wrong!
</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111611_0234_FunwithBCSE5.png" alt=""/>
	</p>
<p>Well, this is interesting. It turns out that my call to <strong>GetItemById(2) </strong>only works for the following reasons:
</p>
<ul>
<li>My external list contains a column named <strong>ID</strong>.
</li>
<li>That column is of data type <strong>integer</strong>.
</li>
</ul>
<p>For instance, I cannot create another external list mapped to a data source with a column named <strong>ID</strong> but of a different type (i.e., <strong>nchar(10)</strong>), <strong><em>even if that column only contains integer values</em></strong>. Here&#8217;s what happens in that case:
</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111611_0234_FunwithBCSE6.png" alt=""/>
	</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111611_0234_FunwithBCSE7.png" alt=""/>
	</p>
<p>Of course, it goes without saying that for an out-of-the-box list, the behavior is as you would expect:
</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111611_0234_FunwithBCSE8.png" alt=""/>
	</p>
<p>Another item of interest is that the <strong>ItemCount</strong> property of external lists always returns <strong>0</strong>, no matter how many items are in the list:
</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111611_0234_FunwithBCSE9.png" alt=""/>
	</p>
<p>If you have any fun stories or observations about dealing with external lists in PowerShell, please feel free to share them in the comments below!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dannyjessee.com/blog/index.php/2011/11/fun-with-bcs-external-lists-and-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Claims Authentication to Configure Multiple Authentication Providers in a CloudShare Environment</title>
		<link>http://www.dannyjessee.com/blog/index.php/2011/11/using-claims-authentication-to-configure-multiple-authentication-providers-in-a-cloudshare-environment/</link>
		<comments>http://www.dannyjessee.com/blog/index.php/2011/11/using-claims-authentication-to-configure-multiple-authentication-providers-in-a-cloudshare-environment/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 11:56:05 +0000</pubDate>
		<dc:creator>Danny Jessee</dc:creator>
				<category><![CDATA[CloudShare]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[access control services]]></category>
		<category><![CDATA[ACS]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Claims]]></category>
		<category><![CDATA[FBA]]></category>

		<guid isPermaLink="false">http://www.dannyjessee.com/blog/index.php/2011/11/using-claims-authentication-to-configure-multiple-authentication-providers-in-a-cloudshare-environment/</guid>
		<description><![CDATA[This post originally appeared in the CloudShare Community Blog on October 25th. CloudShare&#8217;s very own Chris Riley recently shared an environment of mine in a blog post about network orchestration. This environment leverages some exciting new capabilities in SharePoint 2010: namely Claims Authentication in a SharePoint 2010 web application and the ability to configure multiple [...]]]></description>
			<content:encoded><![CDATA[<p><em>This post originally appeared in the <a href="http://blog.cloudshare.com/archives/309">CloudShare Community Blog</a> on October 25th.</em>
</p>
<p>CloudShare&#8217;s very own Chris Riley recently shared <a href="http://use.cloudshare.com/Pro/ShareEnv/TQJ3HDS66KGX">an environment of mine</a> in a <a href="http://blog.cloudshare.com/archives/264">blog post</a> about network orchestration. This environment leverages some exciting new capabilities in SharePoint 2010: namely Claims Authentication in a SharePoint 2010 web application and the ability to configure multiple authentication providers in a single zone. These technologies offer exciting prospects to anyone who previously had to configure separate host headers and URLs for different extranet customers, depending on the mechanism required for each subset of users to log in.
</p>
<p>How does this look to end users? To see Claims in action, fire up the &#8220;SharePoint 2010 (Clean Installation)&#8221; image from the shared environment, open Internet Explorer and navigate to <a href="http://intranet.contoso.com">http://intranet.contoso.com</a>.
</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111211_1155_UsingClaims1.png" alt=""/>
	</p>
<p>You&#8217;ll see an empty Team Site with a &#8220;Claims Web Part&#8221; at the top. Since anonymous access to the site is enabled, the Claims Web Part will initially be empty.
</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111211_1155_UsingClaims2.png" alt=""/>
	</p>
<p>Press the &#8220;Sign In&#8221; link at the top right of the page. The page that appears, <a href="http://intranet.contoso.com/_login/default.aspx">http://intranet.contoso.com/_login/default.aspx</a>, is new in SharePoint 2010 and allows users to choose from all the different authentication providers configured for that web application. (As a side note, there are some exciting opportunities for custom code development here, including the ability to automatically redirect users to a specific authentication provider based on parameters such as their IP address, bypassing this page of options entirely! After all, not all end users are going to appreciate the distinction between &#8220;Windows Authentication&#8221; and &#8220;Forms Authentication.&#8221;)
</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111211_1155_UsingClaims3.png" alt=""/>
	</p>
<p>In this web application, I have configured the following providers:
</p>
<ul>
<li><strong>Windows Authentication</strong> – standard NTLM credentials.
</li>
<li><strong>Forms-Based Authentication (FBA)</strong> – you may remember this option from MOSS. In this environment, I have created a custom membership provider that validates inputted credentials against a SQL Server database. In practice, FBA can be used to authenticate external users against Active Directory or any other account database.
</li>
<li><strong>Azure Access Control Services (ACS) v2</strong> – allows users to log in with credentials from Open ID providers such as Windows Live ID and Facebook.
</li>
</ul>
<p>For a more in-depth read about how to configure Azure ACS v2 as an authentication provider in SharePoint, including adding other Open ID providers such as Google and Yahoo, check out <a href="http://blogs.pointbridge.com/Blogs/nielsen_travis/Pages/Post.aspx?_ID=38">this blog post by Travis Nielsen</a>.
</p>
<p>If I choose Azure ACS v2 (this can be given a friendlier name when you set it up as a Trusted Identity Provider through PowerShell), I will see the following screen. Claims Authentication relies on a series of HTTP redirects to seamlessly direct users between SharePoint and external trusted identity providers such as Azure ACS to log them in. This page is hosted completely outside of my SharePoint environment:
</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111211_1155_UsingClaims4.png" alt=""/>
	</p>
<p>By choosing &#8220;Windows Live ID,&#8221; I will be redirected to <a href="https://login.live.com">https://login.live.com</a>, where I will be prompted to enter my Windows Live ID credentials. (Similarly, you will be redirected to any of the other Open ID providers&#8217; sites should you choose them instead.) After I sign in, another series of HTTP redirects takes place that eventually lands me back in my SharePoint environment, all logged in. The Claims web part on the page shows the various Claims that were sent by the Trusted Identity Provider in an XML-based Security Assertion Markup Language (SAML) token back to SharePoint:
</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/11/111211_1155_UsingClaims5.png" alt=""/>
	</p>
<p>As an application developer, I can leverage these Claims (you see some examples of Claims in the screenshot above include <strong><em>nameidentifier</em></strong>, <strong><em>emailaddress</em></strong>, <strong><em>userid</em></strong>, <strong><em>name</em></strong>, etc.) to make various <strong>authorization</strong> (what resources may this authenticated user access) and <strong>personalization</strong> (how is this particular user or class of user&#8217;s experience customized) decisions about how to handle this user.
</p>
<p>Claims-based authentication and Azure ACS offer exciting possibilities to application developers who are liberated from having to maintain (or even worse, design and develop!) a user management system and all the nightmares that go along with it (think about password resets, forgotten passwords, security requirements for maintaining account information, etc.) As Chris mentions in his blog post, the same paradigm can be applied using Active Directory Federation Services (AD FS v2) to support users logging in to a SharePoint environment using credentials from a trusted external domain.
</p>
<p>That said, Claims-based authentication is not always as easy to set up and work with as it may seem. Using CloudShare, developers and IT professionals can focus their valuable time and energy on solving the issues surrounding the implementation of Claims-based identity in SharePoint 2010 and not be concerned with software licensing, hardware, or other infrastructure concerns.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dannyjessee.com/blog/index.php/2011/11/using-claims-authentication-to-configure-multiple-authentication-providers-in-a-cloudshare-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPSTCDC 2011 Recap</title>
		<link>http://www.dannyjessee.com/blog/index.php/2011/08/spstcdc-2011-recap/</link>
		<comments>http://www.dannyjessee.com/blog/index.php/2011/08/spstcdc-2011-recap/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 21:19:45 +0000</pubDate>
		<dc:creator>Danny Jessee</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.dannyjessee.com/blog/?p=100</guid>
		<description><![CDATA[It was a privilege to attend and be part of SharePoint Saturday-The Conference last week. I am always humbled by how much I have yet to learn about this dynamic and exciting platform. As a developer by trade, I made a point to branch out and try to learn as much as I possibly could [...]]]></description>
			<content:encoded><![CDATA[<p>It was a privilege to attend and be part of <a href="http://www.spstc.org/Pages/default.aspx" target="_blank">SharePoint Saturday-The Conference</a> last week. I am always humbled by how much I have yet to learn about this dynamic and exciting platform. As a developer by trade, I made a point to branch out and try to learn as much as I possibly could on the administrative side of things (while staying true to my developer roots and attending a few developer sessions as well). I also got to take part in a blogging project in conjunction with the conference for <a href="http://engageinsharepoint.co.uk">Engage in SharePoint</a>. I have listed the sessions I attended during the conference with some brief thoughts on each below. Where I contributed a blog post for Engage in SharePoint for a particular session, I have linked to that post as well.</p>
<h2>Day 1 &#8211; Thursday, August 11</h2>
<p>On Thursday, I attended the all-day workshop on <a href="http://engageinsharepoint.co.uk/2011/08/spstc-sharepoint-and-windows-azure-development/" target="_blank"><strong>SharePoint and Windows Azure Development</strong><strong></strong></a>. Sahil Malik and Girish Raja really know their stuff and deliver their knowledge in a very compelling manner. Although I don&#8217;t currently get to do much &#8220;in the cloud&#8221; for my current job, I am hopeful to leverage this platform a lot more in the future.</p>
<h2>SUGDC &#8211; Thursday night</h2>
<p>Thursday evening, I presented a session on Claims-Based Identity in SharePoint 2010 at the <a href="http://sugdc.org" target="_blank">SharePoint Users Group of Washington, DC</a>, which held their August meeting at the conference venue<strong>. </strong>I want to extend my sincere thanks to everyone who stayed around to watch and ask questions during my presentation. For those who were unable to attend, here are my slides:<strong></strong></p>
<div style="width:425px" id="__ss_8832150"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/dannyjessee/claimsbased-identity-in-sharepoint-2010" title="Claims-Based Identity in SharePoint 2010" target="_blank">Claims-Based Identity in SharePoint 2010</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/8832150" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/dannyjessee" target="_blank">Danny Jessee</a> </div>
</p></div>
<h2>Day 2 &#8211; Friday, August 12</h2>
<p>Session 1 &#8211; My first session was <strong><a href="http://engageinsharepoint.co.uk/2011/08/spstcdc-setting-up-a-kerberos-configuration-in-a-sharepoint-farm/" target="_blank">Setting up Kerberos configuration in a SharePoint farm</a> </strong>with L. Carlos Rodriguez. Carlos really knows his stuff and delivered an energetic, knowledgeable, and lively discussion of the trials and tribulations of setting up Kerberos. I really enjoyed this session and wish it could have been a half or full-day workshop to give this subject the depth of attention it deserves.</p>
<p>Session 2 &#8211; The second session I attended was <strong>Accelerate Your SharePoint Development &amp; Testing</strong>, led by my good friends Chris Riley and Zvi Guterman at <a href="http://www.cloudshare.com" target="_blank">CloudShare</a>. I have been a fan of CloudShare for a couple months now, and after this presentation, I&#8217;m even more psyched about what the future holds. I&#8217;m sure there will be many more posts on this blog showing off the cool new things I can do with CloudShare in the future.<strong></strong></p>
<p>Session 3 &#8211; After lunch, I attended Mike Oryszak&#8217;s session on <strong>Getting the Most from User Profiles</strong>. Mike provided some great information about user profiles in SharePoint 2010 along with some valuable tips on how best to manage custom attributes and the synchronization of profile attributes with other line-of-business systems.<strong><br />
</strong></p>
<p>Session 4 &#8211; The next session I attended was Liam Cleary&#8217;s <strong>Are you who you say you are? SharePoint Authentication and Authorization. </strong>Liam is a rock star who really knows his stuff. The knowledge I gained about <a href="http://blog.helloitsliam.com/Lists/Posts/Post.aspx?ID=17" target="_blank">Claims-Based Identity and Trusted Identity Providers</a> will greatly improve any future presentations I give on the subject.</p>
<p>Session 5 &#8211; My final session of the day was <strong>Beyond Approval: Intro to Creating Custom Workflow Actions </strong>with Ben Jones. Ben showed us just how easy it really is to define, implement, and deploy custom workflow actions that can be leveraged by end users in defining SharePoint Designer workflows. This is sure to be a time saver for a lot of developers out there!</p>
<p>Of course, no discussion of Friday would be complete without a discussion of <strong>SharePoint Got Talent</strong>. A big thank you to my friends who stuck around to watch me perform, and thanks to everyone who voted for me. A big congratulations to Marcy Kellar, the winner, and Tiffany Songvilay, the runner-up. Videos of most of the evening&#8217;s thoroughly entertaining performances (including my own) can be found <a href="http://blog.walisystemsinc.com/2011/08/sharepoint-got-talent-all-performances.html" target="_blank">here</a>.</p>
<h2>Day 3 &#8211; Saturday, August 13</h2>
<p>Session 1 &#8211; My first session was <a href="http://engageinsharepoint.co.uk/2011/08/spstcdc-business-connectivity-services-explained-by-example/" target="_blank"><strong>Business Connectivity Services Explained by Example</strong></a> with Kirk Evans. Kirk blew our collective minds when he told us that using the native SQL Server method of connecting to SQL Server data was not the best approach. I will be following Kirk&#8217;s advice and using WCF services or .NET types from now on!</p>
<p>Session 2 &#8211; The next session I attended was <strong>Integrating SSRS 2008R2 with SharePoint 2010 </strong>with Kevin S. Goff. Kevin provided a lot of great insight on how to set up and configure SQL Server Reporting Services 2008 R2 with SharePoint 2010 and gave some very cool demos. I will definitely be setting this up in my development environment soon.</p>
<p>Session 3 &#8211; After lunch, I attended a great deep dive session called <strong>SharePoint Federation: Leveraging ADFSv2 and Claims Based Authentication to integrate with Partners</strong> with Pirooz Javan. Pirooz led a great discussion with a very engaged audience. I gained a lot of valuable real-world perspective from the many relevant questions asked by folks who are leveraging these technologies in the real world every day.</p>
<p>Session 4 &#8211; The next session I attended was Becky Isserman&#8217;s <strong>Epic SharePoint Battle: HTML 5 vs. Silverlight 5</strong>. Besides the awesome free mustache and candy, I learned a lot about the state-of-the-art with current browsers and two emerging technologies: HTML 5 and Silverlight 5 (currently in beta). Walking in to this session, I would have thought Silverlight stood no chance, but after seeing Becky&#8217;s demos and hearing her perspective, I&#8217;m not ready to write Silverlight off just yet.</p>
<p>Session 5 &#8211; The final session I attended was Johnathan Lightfoot&#8217;s <strong>So You Want Your Name in Print</strong>. I have gone back and forth in my own mind about whether I would ever want to invest the time and effort to become a published author in the SharePoint world. Johnathan provided tons of valuable advice from his own experiences as an author that has given me a lot more insight into the process of writing and publishing a book. It will certainly help influence any decisions I make about becoming an author in the future.</p>
<p><strong>Summary</strong></p>
<p>The conference was an outstanding experience overall. I cannot say enough great things about all the volunteers who worked to make my experience such a great one. As I tweeted on Saturday morning, <strong>I got a $1,300 conference experience for 3% of the price</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dannyjessee.com/blog/index.php/2011/08/spstcdc-2011-recap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Checklist for New Forms-Based Authentication Users in SharePoint 2010</title>
		<link>http://www.dannyjessee.com/blog/index.php/2011/07/a-checklist-for-new-forms-based-authentication-users-in-sharepoint-2010/</link>
		<comments>http://www.dannyjessee.com/blog/index.php/2011/07/a-checklist-for-new-forms-based-authentication-users-in-sharepoint-2010/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 00:42:52 +0000</pubDate>
		<dc:creator>Danny Jessee</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Claims]]></category>
		<category><![CDATA[Claims encoded]]></category>
		<category><![CDATA[custom membership provider]]></category>
		<category><![CDATA[display name]]></category>
		<category><![CDATA[FBA]]></category>
		<category><![CDATA[forms based authentication]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[users]]></category>
		<category><![CDATA[welcome name]]></category>

		<guid isPermaLink="false">http://www.dannyjessee.com/blog/index.php/2011/07/a-checklist-for-new-forms-based-authentication-users-in-sharepoint-2010/</guid>
		<description><![CDATA[In recent weeks, I have done a fair amount of analysis and testing of various Claims-Based Identity scenarios in SharePoint 2010. One of these scenarios involves a web application configured to use Forms-Based Authentication (FBA obviously requires the use of Claims in SharePoint 2010) that is tied to a custom membership provider. The membership provider [...]]]></description>
			<content:encoded><![CDATA[<p>In recent weeks, I have done a fair amount of analysis and testing of various Claims-Based Identity scenarios in SharePoint 2010. One of these scenarios involves a web application configured to use Forms-Based Authentication (FBA obviously requires the use of Claims in SharePoint 2010) that is tied to a custom membership provider. The membership provider is quite simple, storing user IDs and passwords in a table within a SQL Server database (in plain text, so please don&#8217;t do this in production!) The solution was initially developed in MOSS 2007 and then migrated to SharePoint 2010. I have not yet performed a Visual Upgrade, which is why my screenshots still look &#8220;MOSS-y.&#8221;</p>
<p>There are <a href="http://blogs.msdn.com/b/dhirajm/archive/2010/08/09/migrate-moss-2007-fba-to-sharepoint-2010.aspx">numerous primers</a> out there that explain how to handle the migration of existing FBA users to their Claims-based counterparts in SharePoint 2010, but what happens when you add new users to the custom membership database after the migration? Does everything go smoothly? In my experience, there are a few steps you should always perform to ensure all new users added to the membership database have the end-user experience you would expect.</p>
<p>First, I will create a new user and show you what may happen if you take no further action.</p>
<h2>Step 1: Create the New User</h2>
<p>This procedure will vary based on your custom membership provider. In this example, I will create the user <strong>example</strong> in my database table with an equally secure password (again, please don&#8217;t do this in production!)</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/072411_0042_AChecklistf14.png" alt="" /></p>
<p>What if I did nothing further at this point? Should the user <strong>example </strong>be able to log in to the FBA-protected site if he or she has not been explicitly granted any access (and when &#8220;All Authenticated Users&#8221; has not been granted any level of access to the site)? The answer may surprise you…</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/072411_0042_AChecklistf21.png" alt="" /></p>
<p>I&#8217;m in!</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/072411_0042_AChecklistf31.png" alt="" /></p>
<p>We&#8217;ll deal with this little bit of nonsense (the ugly Claims-encoded welcome name for the new user) in a minute. By the way, does anyone else find it amusing that the last <strong>two</strong> characters of the user&#8217;s display name are dropped in favor of a <strong>three </strong>character ellipsis (…)?</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/072411_0042_AChecklistf41.png" alt="" /></p>
<p>What&#8217;s even &#8220;better&#8221; is that <strong>example</strong> can click &#8220;View All Site Content&#8221; and navigate to all the lists and libraries within the site.</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/072411_0042_AChecklistf51.png" alt="" /></p>
<p>This does not seem like the behavior we would expect to see. How can we clean things up?</p>
<h2>Step 2: Create an SPUser Object for the New User</h2>
<p>In my initial quest to learn why a new FBA-user&#8217;s welcome name is always in Claims-encoded format, I stumbled upon <a href="http://blog.tylerholmes.com/">Tyler Holmes&#8217;</a> excellent blog post entitled <a href="http://blog.tylerholmes.com/2011/03/awkward-usernames-courtesy-of-claims.html">Awkward Usernames Courtesy of Claims Authentication (FBA)</a>. This led me to realize that I needed to update the <strong>DisplayName </strong>property of the <strong>SPUser</strong> object associated with the new user. Unfortunately, when I tried to run the PowerShell cmdlet Tyler provides, I found out that <strong>my new user doesn&#8217;t even have an associated SPUser object yet</strong>!<strong><br />
</strong></p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/072411_0042_AChecklistf61.png" alt="" /><strong><br />
</strong></p>
<p>To create this object for my new FBA user, I run the following cmdlet:</p>
<p><strong>New-SPUser -Web http://abc.shrpnt.loc -UserAlias &#8220;i:0#.f|abcmembershipprovider|example&#8221;<br />
</strong></p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/072411_0042_AChecklistf71.png" alt="" /><strong><br />
</strong></p>
<p>Before I run Tyler&#8217;s cmdlet to set the <strong>DisplayName </strong>for my SPUser to a friendlier value (although I now see <strong>example</strong> as the user&#8217;s name rather than its Claims-encoded equivalent), I thought I&#8217;d try logging in as <strong>example </strong>again to see if having an SPUser object for my new user makes a difference.</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/072411_0042_AChecklistf81.png" alt="" /></p>
<p><strong>Access Denied?!</strong> But all I did was create a security principal (SPUser) for my new FBA user, I didn&#8217;t change any permissions…</p>
<p>Naturally this is the behavior one would expect to see when a new user is created and has not yet granted access to any resources. It&#8217;s a new FBA user (without a security principal)&#8217;s ability to have reader access across a site that has me more troubled.</p>
<h2>Step 3: Grant the New User the Appropriate Level of Access</h2>
<p>Unless you have assigned &#8220;All Authenticated Users&#8221; with a certain level of access to the site, you will experience the Access Denied error shown above. Just as in any other SharePoint deployment, a user with the appropriate level of access should assign the new user (either through a SharePoint group or directly) the permissions he or she will need on the site.</p>
<p>After this has been done, <strong>example</strong> is able to log in to the site once again. As an added bonus, <strong>example</strong>&#8216;s welcome name at the top right of the page is no longer in Claims-encoded format.</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/072411_0042_AChecklistf91.png" alt="" /></p>
<h2>Step 4: Set the New User&#8217;s DisplayName Value</h2>
<p>When I created the user <strong>example </strong>in Step 1, I gave the user a name of <strong>Example User</strong>. I can run the following in PowerShell to set the user&#8217;s display name accordingly:</p>
<p><strong>$user = Get-SPUser -Web http://abc.shrpnt.loc -Identity &#8220;i:0#.f|abcmembershipprovider|example&#8221;<br />
$user.DisplayName = &#8220;Example User&#8221;<br />
$user.Update()<br />
</strong></p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/072411_0042_AChecklistf101.png" alt="" /><strong><br />
</strong></p>
<p>This step is absolutely necessary if you do not use LDAP or BCS to map user profile properties to your custom membership provider&#8217;s data store. (Conversely, if you do use LDAP or BCS and have user profile synchronization configured, the value you set in this step will be overwritten the next time profile synchronization occurs.)</p>
<p>Now when <strong>example</strong> logs in, we see the new welcome name.</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/072411_0042_AChecklistf111.png" alt="" /></p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/072411_0042_AChecklistf121.png" alt="" /></p>
<p>It&#8217;s worth noting that nothing within the infrastructure of Claims itself has anything to do with the user&#8217;s welcome name or how it is displayed. In fact, using the Claims Viewer Web Part, we can see that the information contained within <strong>example</strong>&#8216;s Claim looks exactly the same as it did before <strong>example </strong>had an associated SPUser object. The display name we just set is not contained within the user&#8217;s Claim; it is only maintained within the SPUser object.<strong><br />
</strong></p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/072411_0042_AChecklistf131.png" alt="" /></p>
<h2>Conclusion</h2>
<p>By following the above steps each time a new user is created, you guarantee consistency with each new user&#8217;s ability to access the site (and not have read access to all site content by default if this is not the desired behavior) and how the new user&#8217;s name is displayed. I strongly encourage you to automate this process using PowerShell or the object model if you need to create a lot of new users.</p>
<p><em>Have any questions, comments, or ideas you want to share? Feel free to post them in the comments below. If you will be at <a href="http://www.spstc.org/Pages/default.aspx">#SPSTCDC</a> next month, feel free to come to my presentation on Claims-Based Identity at the August 11 meeting of the <a href="http://sugdc.org/Events/Meetings/tabid/57/Default.aspx">SharePoint User Group of Washington, DC</a>. The meeting begins at 6:00 p.m.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dannyjessee.com/blog/index.php/2011/07/a-checklist-for-new-forms-based-authentication-users-in-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Which SharePoint Front End Server Am I Hitting?</title>
		<link>http://www.dannyjessee.com/blog/index.php/2011/07/which-sharepoint-front-end-server-am-i-hitting/</link>
		<comments>http://www.dannyjessee.com/blog/index.php/2011/07/which-sharepoint-front-end-server-am-i-hitting/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 00:06:13 +0000</pubDate>
		<dc:creator>Danny Jessee</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[2007]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[front end]]></category>
		<category><![CDATA[frontend]]></category>
		<category><![CDATA[MOSS]]></category>
		<category><![CDATA[NLB]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.dannyjessee.com/blog/index.php/2011/07/sharepoint-2010-which-front-end-server-am-i-on/</guid>
		<description><![CDATA[If you have ever worked in a network load balanced (NLB) environment with multiple SharePoint front end servers, you have no doubt had at least one occasion where only some of your users were seeing some sort of strange behavior. Perhaps some users receive a generic error message when accessing a page and others do [...]]]></description>
			<content:encoded><![CDATA[<p>If you have ever worked in a network load balanced (NLB) environment with multiple SharePoint front end servers, you have no doubt had at least one occasion where only some of your users were seeing some sort of strange behavior. Perhaps some users receive a generic error message when accessing a page and others do not. Whatever the reason, it never hurts to be able to have users give you just a little bit more information to help you in the troubleshooting process.</p>
<p>Of course, you can always dig through the ULS log files on each front end server to look for any anomalies or to match up correlation ID values associated with generic error messages. But wouldn&#8217;t it be great if your end user could tell you that he or she is hitting front end #3 so you don&#8217;t have to waste time searching through the logs on front ends #1 and #2 first?</p>
<p>One potential solution to this problem (and there are no doubt more elegant ways to solve it) are to create multiple images such as the ones below:</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/070411_0006_SharePoint21.jpg" alt="" /></p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/070411_0006_SharePoint22.jpg" alt="" /></p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/070411_0006_SharePoint23.jpg" alt="" /></p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/07/070411_0006_SharePoint24.jpg" alt="" /></p>
<p>Save each image with exactly the same name (such as <strong>frontend.jpg</strong>) and place it in the <strong>TEMPLATE\IMAGES </strong>directory of the SharePoint root on each front end (make sure you match up the correct image with each front end server!) Then, when something goes wrong for one user but not another, you can ask him/her to visit the following URL:</p>
<p><strong>http://yourcompany.com/_layouts/images/frontend.jpg<br />
</strong></p>
<p>Based on the number that appears, you will know exactly which front end that user is hitting!</p>
<p>I hope this information is useful to you. You could extend this by creating a custom URL action called &#8220;Front End Check&#8221; that allows certain users to hit the front end image link directly without having to remember it. Feel free to leave your thoughts and suggestions in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dannyjessee.com/blog/index.php/2011/07/which-sharepoint-front-end-server-am-i-hitting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using CloudShare to Set Up a MOSS to SharePoint 2010 Migration Environment</title>
		<link>http://www.dannyjessee.com/blog/index.php/2011/06/using-cloudshare-to-set-up-a-moss-to-sharepoint-2010-migration-environment/</link>
		<comments>http://www.dannyjessee.com/blog/index.php/2011/06/using-cloudshare-to-set-up-a-moss-to-sharepoint-2010-migration-environment/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 01:41:13 +0000</pubDate>
		<dc:creator>Danny Jessee</dc:creator>
				<category><![CDATA[CloudShare]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[attach]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[MOSS]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.dannyjessee.com/blog/index.php/2011/06/using-cloudshare-to-set-up-a-moss-to-sharepoint-2010-migration-environment/</guid>
		<description><![CDATA[I have been using CloudShare for a little over a week now and have found it to be a convenient, cost-effective way to provision virtual environments to suit my development and testing needs. The time and money CloudShare saves me over having to procure the necessary hardware and software and install operating systems and applications [...]]]></description>
			<content:encoded><![CDATA[<p>I have been using <a href="http://www.cloudshare.com/">CloudShare</a> for a little over a week now and have found it to be a convenient, cost-effective way to provision virtual environments to suit my development and testing needs. The time and money CloudShare saves me over having to procure the necessary hardware and software and install operating systems and applications myself has been <strong>HUGE</strong>. I can have a brand new server up and running, pre-configured with all the applications I need in a matter of minutes. I have also been <strong>very</strong> impressed with how quickly the machines come back up after a reboot. In spite of all these great things, CloudShare is a little light in the area of &#8220;how-to&#8221; documentation and their user support forums do not appear to be very active.</p>
<p>My primary objective at the moment is to use CloudShare to test various MOSS to SharePoint 2010 migration scenarios, particularly with respect to Claims authentication and the numerous problems users have encountered upgrading to Claims-based web applications in SharePoint 2010 (stay tuned for some blog posts about these problems in the future). In order to adequately test these out, I need a single domain with the same set of users and groups to test various pre- and post-upgrade scenarios.</p>
<p>In order to create this environment, I knew I needed to follow these basic steps:</p>
<ol>
<li><strong>Provision and configure a MOSS environment.</strong> For this, I set up a &#8220;SharePoint 2007&#8243; CloudShare machine which in addition to giving me MOSS, also took care of creating the domain <strong>shrpnt.loc</strong> on which I will ultimately be configuring a new SharePoint 2010 instance. On this machine, I have set up a number of different web applications including one with Forms-Based Authentication (FBA) tied to a custom authentication provider. I will also create a new SQL Server instance on this machine to host my SharePoint 2010 configuration and content databases.</li>
<li><strong>Once the MOSS environment was complete, detach my MOSS content databases. </strong>To fully replicate the issues I have seen in various production environments, I wanted to use the &#8220;database attach&#8221; upgrade method described in detail <a href="http://technet.microsoft.com/en-us/library/cc263299.aspx">here</a>.</li>
<li><strong>Create a new SharePoint 2010 farm on a new server on the same domain.</strong> Here is where things with CloudShare get tricky. They have plenty of pre-configured SharePoint 2010 virtual machines available, but all of them are already joined to a domain (obviously a different domain than the one that would be set up in my initial MOSS environment). I&#8217;ll describe how I work around this shortly.</li>
<li><strong>Attach the new content databases in the SharePoint 2010 farm.</strong> After running the <strong>Mount-SPContentDatabase </strong>PowerShell command, this will automatically upgrade them to SharePoint 2010. From here, I am good to go and can continue with my testing.</li>
</ol>
<p>As much as I would have loved to see a &#8220;Windows Server 2008 R2 Enterprise 64-bit with SQL Server and SharePoint 2010 install media available&#8221; option, CloudShare has no such offering. The next best thing, I assumed, was to take their &#8220;SharePoint 2010 (Clean Install)&#8221; VM and do the following:</p>
<ol>
<li>Run <strong>dcpromo</strong> to remove Active Directory Domain Services from the machine, effectively un-joining it from its domain. After restarting, I also removed the &#8220;Active Directory Domain Services&#8221; and &#8220;DNS Server&#8221; roles from the server.</li>
<li>
<div>Join the machine to the existing <strong>shrpnt.loc</strong> domain by performing the following steps:</div>
<ol>
<li>Add the IP address of the <strong>shrpnt.loc</strong> domain controller as the primary DNS server on the VM I want to join to that domain.</li>
<li>On the new VM, join it to the <strong>shrpnt.loc </strong>domain using the domain administrator credentials from the <strong>shrpnt.loc</strong> domain.</li>
<li>Restart the new VM and enjoy being able to leverage the users and groups defined on the <strong>shrpnt.loc </strong>domain.</li>
</ol>
<p><strong>NOTE: </strong>After doing this, CloudShare needs you to hold its hand a little bit to let it know about the &#8220;new&#8221; domain to which you just joined the SharePoint 2010 VM. If you use the browser-based client to access your servers and do not make this change, it will attempt to log you in with an account that is no longer valid. This value can be set by going to &#8220;Edit domains&#8221; under &#8220;Edit Environment.&#8221;</p>
<p><img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/06/062011_0141_UsingCloudS1.png" alt="" /></li>
<li>After another restart, run the SharePoint 2010 Products Configuration Wizard. When it errors out trying to find the original farm, choose to disconnect the server from the existing farm.<img src="http://www.dannyjessee.com/blog/wp-content/uploads/2011/06/062011_0141_UsingCloudS2.png" alt="" /></li>
<li>Re-run the SharePoint 2010 Products Configuration Wizard, this time telling it to create a new server farm.</li>
</ol>
<p>After completing this step, I now have a fresh SharePoint 2010 farm from which I can begin my migration testing. I wish CloudShare had some way to allow users to perform fresh installs of SQL Server and SharePoint 2010 on a Windows Server box without a pre-configured domain VM, but until they do, I believe this is an adequate workaround.</p>
<p>Please post any suggestions for improvements or enhancements to this process in the comments. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dannyjessee.com/blog/index.php/2011/06/using-cloudshare-to-set-up-a-moss-to-sharepoint-2010-migration-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

