Freigeben über


Client Integration, SharePoint and ADFS

If you have ever used ADFS and SharePoint, you know that the client integration experience leaves a lot to be desired.  With the release of Service Pack 2 for the Office Client Suite and a bit of code, this exprerience is greatly improved.  The ADFS team has provided the code for a simple yet powerful HttpModule that will allow for realm discovery between the Office client and the ADFS server.  This HttpModule is placed in the web.config file on your SharePoint farm and can be added only to your Alternate Access Mapping that is using ADFS.  You can find out more about this code and how it works at the ADFS team's blog here:  https://blogs.technet.com/adfs/archive/2009/06/16/office-integration-with-moss-and-adfs.aspx 

Now as with everything SharePoint it is good practice to roll changes into a SharePoint solution where possible.  This ensures that all members of the farm are updated in parellel and any changes made can be easily rolled back.  Attached to this blog is a C# project that will create a SharePoint solution to deploy the necessary assembly and web.config changes needed into your farm.  Inside the project there is a file called ADFSTimerJob.cs and a constant called MY1_FLAG.  This constant is used to identify which web.config to update on each server and can be changed to match your URL identifier.  By default it uses the IIS description that you used when creating or extending your web application. 

 A few notes about the code:

  • You will need WSPBuilder to build the solution or create your own build and targets file to create the WSP.
  • The code uses a custom timer job to make the changes to the web.config files directly and does not use the SPWebConfigModification class ( this is because of the ordering in which the httpmodule needs to be placed in the web config )
  • The feature is web application scoped and will create the timer job ( One-time ) when the feature is activated and deactivated. 
  • The code is presented as is, with no support or implied warranty.
  • Feel free to ask questions against this blog post and I will try to answers as needed.
  • The password for the signing cert is password

Download: ADFSModuleSharePointSolution.zip

ADFSModuleSharePointSolution.zip