Use the OWIN Security Components in ASP.NET to Implement Web Sign On with ADFS

The enthusiasm for the new OWIN-based programming model is spreading – and one of the things I get asked most often has to do with how to use it to connect to ADFS.

That’s actually pretty simple. So simple, in fact, that I don’t really need to write much to tell you how to do it: I just need to help you to connect some dots.

Just today we published a new sample showing how to implement web sign on via Azure AD using the OWIN component that implements WS-Federation. Well, all you need to do is to clone the repo and change 2 lines of code. Specifically, you need to substitute the initialization values for realm and metadata document address in the Startup.Auth.cs file to match the entry for your app in your ADFS.

The above assumes that you already have an app provisioned in ADFS that you want to use. If you don’t, and if you need help to set up a web app in ADFS: check out this post, and specifically the “Provisioning your Web App in ADFS” – it contains step by step instructions for provisioning a new RP trust.

See? As promised, that *is* the shortest post in ages.  I love when stuff comes together so smoothly, and I am sure you’ll love it too! Smile

Leave a Reply

Your email address will not be published. Required fields are marked *