ADFS Publishing Rule in TMG
After you install the ADFS server for Office 365, you need to publish the rule in your TMG (Threat Management Gateway) if you are using TMG as your front end firewall. To do that, open the TMG portal and do the following
Create the new rule.
http://io365.files.wordpress.com/2012/05/a1.png
http://io365.files.wordpress.com/2012/05/a2.png
http://io365.files.wordpress.com/2012/05/a3.png
http://io365.files.wordpress.com/2012/05/a4.jpg
http://io365.files.wordpress.com/2012/05/a5.png
Now create the new Listener for ADFS by doing below.
http://io365.files.wordpress.com/2012/05/pp.jpg
http://io365.files.wordpress.com/2012/05/a6.png
http://io365.files.wordpress.com/2012/05/a7.jpg
http://io365.files.wordpress.com/2012/05/a8.jpg
http://io365.files.wordpress.com/2012/05/a9.png
http://io365.files.wordpress.com/2012/05/a10.jpg
Then click Select Certificate. (Before you do this, make sure that you have uploaded your certificate for ADFS service in your IIS of TMG. When you upload it, the installed certificate will show as below.)
http://io365.files.wordpress.com/2012/05/a111.jpg
Above you have to select the valid certificate for ADFS.
http://io365.files.wordpress.com/2012/05/a121.png
http://io365.files.wordpress.com/2012/05/a131.png
http://io365.files.wordpress.com/2012/05/a141.png
Now click OK and your ADFS listener configuration is done. Once you did this, below screen you will be able to select the newly created listener.
http://io365.files.wordpress.com/2012/05/a151.jpg
http://io365.files.wordpress.com/2012/05/a161.jpg
http://io365.files.wordpress.com/2012/05/a171.png
http://io365.files.wordpress.com/2012/05/a181.png
http://io365.files.wordpress.com/2012/05/a191.png
http://io365.files.wordpress.com/2012/05/a201.png
http://io365.files.wordpress.com/2012/05/a20a1.png
http://io365.files.wordpress.com/2012/05/a211.png
http://io365.files.wordpress.com/2012/05/a221.png
Click OK and now your ADFS rule has been created inside TMG.
Now right-click the ADFS rule and select Configure HTTP.
http://io365.files.wordpress.com/2012/05/a231.png
Uncheck the "Verify normalization" and "Block high bit characters" and click OK.
Now your TMG rule for ADFS publishing rule is ready for Production.
Enjoy!!!