<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.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>stevenha</title><link>http://blogs.technet.com/b/stevenha/</link><description>Exchange and Office365 Adventures from the world of Microsoft Premier Field Engineering</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Updated Snapshot report of Public Folder Usage Script</title><link>http://blogs.technet.com/b/stevenha/archive/2013/02/21/updated-snapshot-report-of-public-folder-usage-script.aspx</link><pubDate>Thu, 21 Feb 2013 19:13:24 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3554233</guid><dc:creator>Steve Halligan</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/stevenha/rsscomments.aspx?WeblogPostID=3554233</wfw:commentRss><comments>http://blogs.technet.com/b/stevenha/archive/2013/02/21/updated-snapshot-report-of-public-folder-usage-script.aspx#comments</comments><description>&lt;p&gt;Updated my Snapshot report of Public Folder Usage Script:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fixed Last Modified Time so it actually works (dang typo)&lt;/li&gt;
&lt;li&gt;Added "Email Enabled" to report&lt;/li&gt;
&lt;li&gt;Added "Primary SMTP Address" to report if folder is email enabled&lt;/li&gt;
&lt;li&gt;Added Progress bar so you can tell it is actually still running&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can download it here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://gallery.technet.microsoft.com/office/Snapshot-report-of-Public-21235573"&gt;http://gallery.technet.microsoft.com/office/Snapshot-report-of-Public-21235573&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3554233" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/stevenha/archive/tags/Exchange+2010/">Exchange 2010</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/script/">script</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/Powershell/">Powershell</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/public+folders/">public folders</category></item><item><title>Offline Address Book Full Download Fails if Hardware Load Balancer in use</title><link>http://blogs.technet.com/b/stevenha/archive/2013/01/09/offline-address-book-full-download-fails-if-hardware-load-balancer-in-use.aspx</link><pubDate>Wed, 09 Jan 2013 19:26:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3544998</guid><dc:creator>Steve Halligan</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/stevenha/rsscomments.aspx?WeblogPostID=3544998</wfw:commentRss><comments>http://blogs.technet.com/b/stevenha/archive/2013/01/09/offline-address-book-full-download-fails-if-hardware-load-balancer-in-use.aspx#comments</comments><description>&lt;p&gt;I came across an interesting scenario relating to the use of a Hardware Load Balancer publishing Exchange Client Access Servers. This relates specifically to how CAS distributes OAB and how Outlook decides which files it needs to perform an OAB update.&lt;/p&gt;
&lt;p&gt;First, let's walk through how it is supposed to work starting from a new Outlook Profile (if you already know the OAB download/update process, feel free to skip to the next section):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Outlook finds (via AutoDiscover) the url to use to connect to the OAB distribution server. It will look something like https://mail.contoso.com/OAB/&amp;lt;guid of OAB&amp;gt;/&lt;/li&gt;
&lt;li&gt;Outlook attempts to download the OAB.XML file at that URL. This is the "manifest" file that lists out the other files that Outlook will need to download.&lt;/li&gt;
&lt;li&gt;Outlook attempts to download the "template" file for whatever language Outlook is running. For English, it finds the entry in the oab.xml that specifies langid 0409. The line in the OAB.xml looks something like this:&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt;&amp;lt;Template &lt;span style="background-color: yellow;"&gt;seq='7'&lt;/span&gt; ver='7' size='6028' uncompressedsize='26470' SHA='df80ec818f23bb6b23aa55cbc49d45986604af34' langid='0409' type='windows'&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1efdeb0a-56fe-488d-aed7-b3d9179193a2-lng0409-7.lzx&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Outlook attempts to download the template file &lt;span style="font-family: Courier New;"&gt;1efdeb0a-56fe-488d-aed7-b3d9179193a2-lng0409-&lt;span style="background-color: yellow;"&gt;7&lt;/span&gt;.lzx &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Outlook finds the file name for the full OAB download in the manifest&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt;&amp;lt;Full &lt;span style="background-color: yellow;"&gt;seq='7'&lt;/span&gt; ver='32' size='2408' uncompressedsize='11481' SHA='c3874445e4942eac788523db974e60a37463cabb'&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1efdeb0a-56fe-488d-aed7-b3d9179193a2-data-7.lzx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/Full&amp;gt; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Outlook attempts to download the full OAB file &lt;span style="font-family: Courier New;"&gt;1efdeb0a-56fe-488d-aed7-b3d9179193a2-data-&lt;span style="background-color: yellow;"&gt;7&lt;/span&gt;.lzx &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now Outlook has an up-to-date OAB. Outlook and the Server track OAB status using a sequence number. In the above manifest, you can see the current sequence number of the OAB is &lt;span style="background-color: yellow;"&gt;7&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Next time (say 24 hours later) Outlook goes to update OAB it goes through the following process.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Outlook finds (via AutoDiscover) the url to use to connect to the OAB distribution server. It will look something like https://mail.contoso.com/OAB/&amp;lt;guid of OAB&amp;gt;/&lt;/li&gt;
&lt;li&gt;Outlook attempts to download the OAB.XML file at that URL. This is the "manifest" file that lists out the other files that Outlook will need to download.&lt;/li&gt;
&lt;li&gt;Outlook compares its own sequence number to that in the manifest. In our example, Outlook downloaded sequence 7. When looking at the manifest we can see that the server is up to sequence 9&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt;&amp;lt;OAL id='1efdeb0a-56fe-488d-aed7-b3d9179193a2' dn='/' name='\Global Address List'&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Full &lt;span style="background-color: yellow;"&gt;seq='9'&lt;/span&gt; ver='32' size='2422' uncompressedsize='11496' SHA='6852ea7fc58cfe2788766efbec61bc27cf62a96e'&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1efdeb0a-56fe-488d-aed7-b3d9179193a2-data-&lt;span style="background-color: yellow;"&gt;9&lt;/span&gt;.lzx&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/Full&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Outlook looks in the manifest to see if there are differential files available to get from sequence 7 to sequence 9&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt;&amp;lt;Diff &lt;span style="background-color: yellow;"&gt;seq='9'&lt;/span&gt; ver='32' size='122' uncompressedsize='11496' SHA='05eed595e0fdf88245a48d42d80431337dff36cc'&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1efdeb0a-56fe-488d-aed7-b3d9179193a2-binpatch-&lt;span style="background-color: yellow;"&gt;9&lt;/span&gt;.lzx&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/Diff&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Diff &lt;span style="background-color: yellow;"&gt;seq='8'&lt;/span&gt; ver='32' size='132' uncompressedsize='11494' SHA='4e0e62a0c3af3786310f9bd6a9b802879bcde07f'&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1efdeb0a-56fe-488d-aed7-b3d9179193a2-binpatch-&lt;span style="background-color: yellow;"&gt;8&lt;/span&gt;.lzx&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/Diff&amp;gt; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;They are there! Outlook grabs those 2 files and applies them in order. Outlook is now up-to-date at sequence 9.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;However, if either of these items are true:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The diff files that Outlook needed to get current aren't available (they are kept for 30 days by default)&lt;/li&gt;
&lt;li&gt;New profile&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Outlook will fall back to a full download and follow the first procedure.&lt;/p&gt;
&lt;h2&gt;When good manifests go bad&amp;hellip;&lt;/h2&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now&amp;hellip;on to the meat of the matter.&lt;/p&gt;
&lt;p&gt;Consider this scenario:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Client Access web based services live behind a hardware load balancer.&lt;/li&gt;
&lt;li&gt;Outlook decides it needs to do a full OAB download.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Outlook goes to the OAB URL and grabs the OAB.XML file. As laid out in the Full download procedure above, the first thing Outlook is going to look for is the template file.&lt;/p&gt;
&lt;p&gt;And then&amp;hellip;failure. If you initiated the download manually, you may see an 0x80200011 error code. You will also see an Event ID 27:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;Log Name: Application &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;Source: Outlook &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;Date: 12/20/2012 1:20:01 PM &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;Event ID: 27 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;Task Category: None &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;Level: Warning &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;Keywords: Classic &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;User: N/A &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;Computer: workstation1.corp.contoso.com &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;Description: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;OAB Download Failed. (Result code in event data). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;Event Xml: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;&amp;lt;Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;System&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;Provider Name="Outlook" /&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;EventID Qualifiers="16384"&amp;gt;27&amp;lt;/EventID&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;Level&amp;gt;3&amp;lt;/Level&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;Task&amp;gt;0&amp;lt;/Task&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;Keywords&amp;gt;0x80000000000000&amp;lt;/Keywords&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;TimeCreated SystemTime="2012-12-20T19:20:01.000000000Z" /&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;EventRecordID&amp;gt;38872&amp;lt;/EventRecordID&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;Channel&amp;gt;Application&amp;lt;/Channel&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;Computer&amp;gt;cas.corp.contoso.com&amp;lt;/Computer&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;Security /&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;/System&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;EventData&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;Data&amp;gt;OAB Download Failed. (Result code in event data).&amp;lt;/Data&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;Binary&amp;gt;&lt;span style="background-color: yellow;"&gt;0C&lt;/span&gt;00000094011980&lt;span style="background-color: aqua;"&gt;0817&lt;/span&gt;0000&lt;span style="background-color: lime;"&gt;0C17&lt;/span&gt;000008170000000000000000000000000000E9FD00000000000000000000784E000090500000344D0000FC2500009028000080BDF7080D5D0100000000005C000000200000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&amp;lt;/Binary&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt; &amp;lt;/EventData&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;&amp;lt;/Event&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;If you review Dave Goldman's excellent blog post on this subject (&lt;a href="http://blogs.msdn.com/b/dgoldman/archive/2006/06/19/troubleshooting-offline-address-book-downloads-with-outlook-diagnostic-logging-_2800_event-id-27_2900_.aspx"&gt;http://blogs.msdn.com/b/dgoldman/archive/2006/06/19/troubleshooting-offline-address-book-downloads-with-outlook-diagnostic-logging-_2800_event-id-27_2900_.aspx&lt;/a&gt; ) you will see that the binary data starts with &lt;span style="background-color: yellow;"&gt;0C&lt;/span&gt; which indicates that Outlooks is doing a full download. You can also see Outlook's current OAB sequence number &lt;span style="background-color: aqua;"&gt;0817&lt;/span&gt; and the Server's current sequence number &lt;span style="background-color: lime;"&gt;0C17&lt;/span&gt;. To translate these hex sequence numbers into decimal, flip the bytes. The client translates to 5896 and the server to 5900 in this example. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;Having said all of that, there is little indication as to why the download failed. To attempt to see what is really going on, we can use the bitsadmin tool. The Binary Intelligent Transfer agent is the code that performs the OAB download for Outlook and it is a built-in part of Windows. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;C:\&amp;gt;bitsadmin /list /verbose &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;BITSADMIN version 2.0 [ 6.6.2600.2180 ] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;BITS administration utility. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;(C) Copyright 2000-2004 Microsoft Corp. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;Listed 0 job(s). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;Well, that is not very helpful&amp;hellip;we need to run this tool at the moment of the failure. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;Let's try this batch file: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;@echo off &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;:work &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;bitsadmin /list /verbose &amp;gt;&amp;gt; c:\bitsoutput.txt &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;goto work &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;Looking over the output file that was created, we see Outlook grabbing the OAB.xml file successfully and then it moves on to download the template file: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;BITSADMIN version 2.0 [ 6.6.2600.2180 ] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;BITS administration utility. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;(C) Copyright 2000-2004 Microsoft Corp. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;GUID: {D5820AE4-24C8-4C43-8B1D-728E3C16CB4E} DISPLAY: Microsoft Outlook Offline Address Book &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;TYPE: DOWNLOAD STATE: &lt;span style="background-color: yellow;"&gt;CONNECTING&lt;/span&gt; OWNER: CORP\owells &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;PRIORITY: NORMAL FILES: 0 / 1 BYTES: 0 / UNKNOWN &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;CREATION TIME: 1/8/2013 11:23:46 AM MODIFICATION TIME: 1/8/2013 11:23:47 AM &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;COMPLETION TIME: UNKNOWN ACL FLAGS: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;NOTIFY INTERFACE: UNREGISTERED NOTIFICATION FLAGS: 3 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;RETRY DELAY: 600 NO PROGRESS TIMEOUT: 1209600 ERROR COUNT: 0 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;PROXY USAGE: PRECONFIG PROXY LIST: NULL PROXY BYPASS LIST: NULL &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;DESCRIPTION: Microsoft Outlook Offline Address Book Template &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;JOB FILES: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0 / UNKNOWN WORKING https://mail.contoso.com/OAB/9165d096-ff22-4a79-ba2d-b47d8645e220/418771d0-6766-4c27-ab27-b6068ffb56a8-lng0409-&lt;span style="background-color: lime;"&gt;5958&lt;/span&gt;.lzx -&amp;gt; C:\Documents and Settings\owells\Local Settings\Application Data\Microsoft\Outlook\tmplts.tm_ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;NOTIFICATION COMMAND LINE: none &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;Listed 1 job(s). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Great. You can see it &lt;span style="background-color: yellow;"&gt;connecting&lt;/span&gt; to grab the template file for English with the sequence number &lt;span style="background-color: lime;"&gt;5958&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Uh oh!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;BITSADMIN version 2.0 [ 6.6.2600.2180 ] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;BITS administration utility. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;(C) Copyright 2000-2004 Microsoft Corp. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;GUID: {D5820AE4-24C8-4C43-8B1D-728E3C16CB4E} DISPLAY: Microsoft Outlook Offline Address Book &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;TYPE: DOWNLOAD STATE: ERROR OWNER: CORP\owells &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;PRIORITY: NORMAL FILES: 0 / 1 BYTES: 0 / UNKNOWN &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;CREATION TIME: 1/8/2013 11:23:46 AM MODIFICATION TIME: 1/8/2013 11:23:50 AM &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;COMPLETION TIME: UNKNOWN ACL FLAGS: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;NOTIFY INTERFACE: UNREGISTERED NOTIFICATION FLAGS: 3 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;RETRY DELAY: 600 NO PROGRESS TIMEOUT: 1209600 ERROR COUNT: 1 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;PROXY USAGE: PRECONFIG PROXY LIST: NULL PROXY BYPASS LIST: NULL &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;ERROR FILE: https://mail.contoso.com/OAB/9165d096-ff22-4a79-ba2d-b47d8645e220/418771d0-6766-4c27-ab27-b6068ffb56a8-lng0409-5958.lzx -&amp;gt; C:\Documents and Settings\owells\Local Settings\Application Data\Microsoft\Outlook\tmplts.tm_ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;ERROR CODE: 0x80190191 - &lt;span style="background-color: yellow;"&gt;The requested resource requires user authentication&lt;/span&gt;. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;ERROR CONTEXT: 0x00000005 - The error occurred while the remote file was being processed. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;DESCRIPTION: Microsoft Outlook Offline Address Book Template &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;JOB FILES: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0 / UNKNOWN WORKING https://mail.contoso.com/OAB/9165d096-ff22-4a79-ba2d-b47d8645e220/418771d0-6766-4c27-ab27-b6068ffb56a8-lng0409-5958.lzx -&amp;gt; C:\Documents and Settings\owells\Local Settings\Application Data\Microsoft\Outlook\tmplts.tm_ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;NOTIFICATION COMMAND LINE: none &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;Listed 1 job(s). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Requires authentication??? I bet that is a bit of a misinterpretation of what happened. How about we go see what files are on the server? When we looked at the OAB directory (c:\program files\microsoft\exchange\v14\client access\oab) we see that there is a template file there&amp;hellip;but it has a sequence number of 5961! Unlike the binpatch diff files, Exchange only keeps the latest template file. If we go looking for 5958 and the server has 5961, we will not find it. The above error really means "file not found".&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Why the heck did we go looking for an old template file? Looking at the OAB.xml file on the server, it has the proper sequence number and filename for the template file.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Were we not looking at the current OAB.xml?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We tried opening OAB.xml in IE on the client machine. What the&amp;hellip;why does this OAB.xml seem to indicate the 5958 is the current sequence number?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, we now know what is not working&amp;hellip;we can't go looking for old sequences&amp;hellip;that won't work.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But, how did this happen?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;The Answer (at long last):&lt;/h1&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The default configuration on many hardware load balancers is to cache some http content. We were looking at a cached copy of the oab.xml! Thanks for the help, Mr. Load Balancer!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;The Solution:&lt;/h1&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Turn off http caching on the load balancer. You can either disable it for all Exchange Web services, the OAB vdir only, or just the OAB.xml file depending on your preference and your load balancers capabilities.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3544998" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/stevenha/archive/tags/Exchange+2010/">Exchange 2010</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/Exchange+2007/">Exchange 2007</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/Offline+Address+Book/">Offline Address Book</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/Outlook/">Outlook</category></item><item><title>Snapshot report of Public Folder Usage (name, last access, items, etc)</title><link>http://blogs.technet.com/b/stevenha/archive/2013/01/04/snapshot-report-of-public-folder-name-last-access-items-etc.aspx</link><pubDate>Fri, 04 Jan 2013 19:45:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3544185</guid><dc:creator>Steve Halligan</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/stevenha/rsscomments.aspx?WeblogPostID=3544185</wfw:commentRss><comments>http://blogs.technet.com/b/stevenha/archive/2013/01/04/snapshot-report-of-public-folder-name-last-access-items-etc.aspx#comments</comments><description>&lt;p&gt;This is a simple script that will dump info about your public folders to a csv file.&amp;nbsp; The tricky bit here is that it combines data values from get-publicfolder, get-publicfolderstatistics and get-publicfolderclientpermissions into one CSV report.&lt;/p&gt;
&lt;p&gt;Find it at &lt;a href="http://gallery.technet.microsoft.com/office/Snapshot-report-of-Public-21235573"&gt;http://gallery.technet.microsoft.com/office/Snapshot-report-of-Public-21235573&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3544185" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/stevenha/archive/tags/Exchange+2010/">Exchange 2010</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/Exchange+2007/">Exchange 2007</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/script/">script</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/Powershell/">Powershell</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/public+folders/">public folders</category></item><item><title>“The Public Group Cannot Be Displayed” error attempting to modify members of a large DL in Outlook with Exchange 2010</title><link>http://blogs.technet.com/b/stevenha/archive/2012/11/29/the-public-group-cannot-be-displayed-error-attempting-to-modify-members-of-a-large-dl-in-outlook-with-exchange-2010.aspx</link><pubDate>Thu, 29 Nov 2012 17:42:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3535524</guid><dc:creator>Steve Halligan</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/stevenha/rsscomments.aspx?WeblogPostID=3535524</wfw:commentRss><comments>http://blogs.technet.com/b/stevenha/archive/2012/11/29/the-public-group-cannot-be-displayed-error-attempting-to-modify-members-of-a-large-dl-in-outlook-with-exchange-2010.aspx#comments</comments><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ever see this error when you try to modify members of a large (1000+) member DL using Outlook when your mailbox is on Exchange 2010?&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/3660.ThePublicGroup.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/300x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/3660.ThePublicGroup.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;"The public Group cannot be displayed. The operation failed"&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/3733.ThePublicGroup2.JPG"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/300x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/3733.ThePublicGroup2.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;"The public group cannot be displayed. Too many names have been found in the directory service or the server has exceeded its time limit for searching. Type more letters of the name and try again"&lt;/p&gt;
&lt;p&gt;If you clear this error, you may see a partial list of the DL members displayed. You will be able to successfully add members to the DL. You will also be able to remove members, if they managed to make it in the partial list.&lt;/p&gt;
&lt;p&gt;Poking around in the application log of the Client Access Server you are connected to shows nothing out of the ordinary&amp;hellip;even if you ramp up diagnostic logging.&lt;/p&gt;
&lt;p&gt;The reason this error pops up, and the reason why nothing is logged, is because the CAS is doing exactly what you told it to do. Well&amp;hellip;to be fair&amp;hellip;it is doing exactly what its default settings told it to do. It is throttling your connection.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The specific throttling policy parameter that relates to this is RCAPercentTimeInAB. By default, this parameter is blank in the Default Throttling Policy that ships with Exchange 2010. If I am reading TechNet right, blank mean default and default maps to a setting of '5'. For all of these *PercentTimeIn* parameters, the number indicates what percentage of a minute you can use in that minute. '5' would therefore equate to 3 seconds (5% of 60 seconds). If you use your budget of 3 seconds, you need to wait for the minute to roll over to get a new 3 second allocation. Outlook is not that patient (nor are most end-users) and blows the error above.&lt;/p&gt;
&lt;p&gt;I have found that a setting of 20 (which would equate to 12 seconds) is adequate for most deployments, but your needs could differ. I highly recommend experimenting with this setting on a "test" throttling policy that you apply to a few test users before you roll anything into the default policy.&lt;/p&gt;
&lt;p&gt;For more details on creating and setting Client Throttling Policies, see &lt;a href="http://technet.microsoft.com/en-us/library/dd297964"&gt;Understanding Client Throttling -- TechNet&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Bonus Track&lt;/h1&gt;
&lt;p&gt;If you are using Outlook 2010 and the DL in question is 5000+ users, you may also see this error when you try to look at the properties of the DL:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/3884.UnableToConnect.jpg"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/3884.UnableToConnect.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;"Unable to connect to retrieve additional data"&lt;/p&gt;
&lt;p&gt;To fix this one, you need an update to Outlook to get rid of a hard coded limit of 500 DL members.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://support.microsoft.com/kb/2598291"&gt;Member names are not displayed in a distribution list in Outlook 2010 KB2598291&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This fix was delivered in the &lt;a href="http://support.microsoft.com/kb/2598318"&gt;April 24, 2010 Outlook 2010 hotfix package&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3535524" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/stevenha/archive/tags/Outlook+2010/">Outlook 2010</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/Throttling+Policy/">Throttling Policy</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/Exchange+2010/">Exchange 2010</category></item><item><title>Output Exchange 2010 RBAC Role Entries in HTML Report</title><link>http://blogs.technet.com/b/stevenha/archive/2012/11/15/output-exchange-2010-rbac-role-entries-in-html-report.aspx</link><pubDate>Thu, 15 Nov 2012 21:08:28 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3532813</guid><dc:creator>Steve Halligan</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/stevenha/rsscomments.aspx?WeblogPostID=3532813</wfw:commentRss><comments>http://blogs.technet.com/b/stevenha/archive/2012/11/15/output-exchange-2010-rbac-role-entries-in-html-report.aspx#comments</comments><description>&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;***THIS ONLY WILL WORK IN POWERSHELL V3 (Win8 and Server 2012)***
&lt;/span&gt;&lt;/p&gt;&lt;p&gt; 
 &lt;/p&gt;&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;The script will run in Powershell V2, but the data in the output tables will contain only the type information and not the actual data.
&lt;/span&gt;&lt;/p&gt;&lt;p&gt; 
 &lt;/p&gt;&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;To use this script, you must be connected to Exchange remote powershell. Replace the URI below with the URI for your CAS.  Replace "basic" with whatever authentication means you allow on the "powershell" IIS vdir on CAS.  This may be "kerberos" if you are on a domain joined machine.
&lt;/span&gt;&lt;/p&gt;&lt;p style="background: white"&gt;&lt;a href="http://gallery.technet.microsoft.com/Output-Exchange-2010-RBAC-c7c85816/description"&gt;&lt;span style="color:#00749e; font-family:Times New Roman; font-size:9pt"&gt;Copy Code&lt;/span&gt;&lt;/a&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;
		&lt;/span&gt;&lt;/p&gt;&lt;p style="background: white"&gt;&lt;span style="color:#e66a38; font-family:Segoe UI; font-size:9pt"&gt;&lt;strong&gt;PowerShell
&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background: white"&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;Edit|Remove
&lt;/span&gt;&lt;/p&gt;&lt;p style="background: white"&gt;&lt;span style="color:black; font-family:Courier New; font-size:10pt"&gt;$cred = get-credentials 
&lt;/span&gt;&lt;/p&gt;&lt;p style="background: white"&gt;&lt;span style="color:black; font-family:Courier New; font-size:10pt"&gt;$session = new-pssession -configurationname Microsoft.Exchange -connectionuri "https://mail.contoso.com/powershell" -authentication basic -credentials $cred 
&lt;/span&gt;&lt;/p&gt;&lt;p style="background: white"&gt;&lt;span style="color:black; font-family:Courier New; font-size:10pt"&gt;import-pssession $session
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;This script with iterate through all roles defined and then through each entry.
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;It will output all of the allowed Commandlets for each role and what parameters are available.
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;Example Output:
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3a3e43; font-family:Segoe UI; font-size:11pt"&gt;&lt;strong&gt;Role:Recipient Policies
&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;table style="border-collapse:collapse" border="0"&gt;&lt;colgroup&gt;&lt;col style="width:164px"/&gt;&lt;col style="width:459px"/&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;&lt;tr&gt;&lt;td vAlign="middle" style="padding-top: 1px; padding-left: 1px; padding-bottom: 1px; padding-right: 1px; border-top:  solid #bbbbbb 0.75pt; border-left:  solid #bbbbbb 0.75pt; border-bottom:  solid #bbbbbb 0.75pt; border-right:  solid #bbbbbb 0.75pt"&gt;&lt;p style="text-align: center"&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td vAlign="middle" style="padding-top: 1px; padding-left: 1px; padding-bottom: 1px; padding-right: 1px; border-top:  solid #bbbbbb 0.75pt; border-left:  none; border-bottom:  solid #bbbbbb 0.75pt; border-right:  solid #bbbbbb 0.75pt"&gt;&lt;p style="text-align: center"&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;&lt;strong&gt;Parameters&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td vAlign="middle" style="padding-top: 1px; padding-left: 1px; padding-bottom: 1px; padding-right: 1px; border-top:  none; border-left:  solid #bbbbbb 0.75pt; border-bottom:  solid #bbbbbb 0.75pt; border-right:  solid #bbbbbb 0.75pt"&gt;&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;Write-AdminAuditLog&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td vAlign="middle" style="padding-top: 1px; padding-left: 1px; padding-bottom: 1px; padding-right: 1px; border-top:  none; border-left:  none; border-bottom:  solid #bbbbbb 0.75pt; border-right:  solid #bbbbbb 0.75pt"&gt;&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;Comment Confirm Debug DomainController ErrorAction ErrorVariable OutBuffer OutVariable Verbose WarningAction WarningVariable WhatIf&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td vAlign="middle" style="padding-top: 1px; padding-left: 1px; padding-bottom: 1px; padding-right: 1px; border-top:  none; border-left:  solid #bbbbbb 0.75pt; border-bottom:  solid #bbbbbb 0.75pt; border-right:  solid #bbbbbb 0.75pt"&gt;&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;Set-ThrottlingPolicyAssociation&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td vAlign="middle" style="padding-top: 1px; padding-left: 1px; padding-bottom: 1px; padding-right: 1px; border-top:  none; border-left:  none; border-bottom:  solid #bbbbbb 0.75pt; border-right:  solid #bbbbbb 0.75pt"&gt;&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;Confirm Debug DomainController ErrorAction ErrorVariable Identity OutBuffer OutVariable ThrottlingPolicy Verbose WarningAction WarningVariable WhatIf&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;You can download it &lt;a href="http://gallery.technet.microsoft.com/Output-Exchange-2010-RBAC-c7c85816"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3532813" width="1" height="1"&gt;</description></item><item><title>Script to convert an MS Online Directory Immutable ID to an AD GUID (and Vice Versa)</title><link>http://blogs.technet.com/b/stevenha/archive/2012/11/13/script-to-convert-an-ms-online-directory-immutable-id-to-an-ad-guid-and-vice-versa.aspx</link><pubDate>Tue, 13 Nov 2012 18:25:13 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3532333</guid><dc:creator>Steve Halligan</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/stevenha/rsscomments.aspx?WeblogPostID=3532333</wfw:commentRss><comments>http://blogs.technet.com/b/stevenha/archive/2012/11/13/script-to-convert-an-ms-online-directory-immutable-id-to-an-ad-guid-and-vice-versa.aspx#comments</comments><description>&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;This script can take an ImmutableID found in the DirSync Metaverse or via get-msoluser and output the GUID of the corresponding object from the SOURCE AD.
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;It can also take the Source AD GUID and tell you what the ImmutableID should be.
&lt;/span&gt;&lt;/p&gt;&lt;p&gt; 
 &lt;/p&gt;&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;Useful in troubleshooting DirSync issues and determining which AD Object maps to which MSOD object.
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:black; font-family:Segoe UI; font-size:9pt"&gt;Examples:&lt;br/&gt;To convert a GUID to an Immutable ID: GUID2ImmutableID.ps1 '748b2d72-706b-42f8-8b25-82fd8733860f'&lt;br/&gt;To convert an ImmutableID to a GUID: GUID2ImmutableID.ps1 'ci2LdGtw+EKLJYL9hzOGDw=='
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;It can be found at: &lt;a href="http://gallery.technet.microsoft.com/office/Covert-DirSyncMS-Online-5f3563b1"&gt;http://gallery.technet.microsoft.com/office/Covert-DirSyncMS-Online-5f3563b1&lt;/a&gt;
	&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3532333" width="1" height="1"&gt;</description></item><item><title>Customizing the ADFS forms based login page</title><link>http://blogs.technet.com/b/stevenha/archive/2012/11/12/customizing-the-adfs-forms-based-login-page.aspx</link><pubDate>Mon, 12 Nov 2012 21:20:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3532046</guid><dc:creator>Steve Halligan</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/stevenha/rsscomments.aspx?WeblogPostID=3532046</wfw:commentRss><comments>http://blogs.technet.com/b/stevenha/archive/2012/11/12/customizing-the-adfs-forms-based-login-page.aspx#comments</comments><description>&lt;p&gt;By default, the ADFS forms based login page supplied by an ADFSProxy server is a best pretty boring and at worst inaccurate.&lt;/p&gt;
&lt;p&gt;Out of the box, it looks like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/5342.adfslogin1.png"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/5342.adfslogin1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Wouldn't it be nice to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add some pretty logos?&lt;/li&gt;
&lt;li&gt;Correct that Domain\username example so it show UPN format?&lt;/li&gt;
&lt;li&gt;Change the instruction text?&lt;/li&gt;
&lt;li&gt;Give the page a better title than "Sign In"?&lt;/li&gt;
&lt;li&gt;Remove or change that hostname header above the login box?&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Add an "Authorized Use" text block at the bottom to keep the lawyers from bugging you?&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Well, if you agree, today is your lucky day!&lt;/p&gt;
&lt;p&gt;Please, keep in mind that it is quite possible (likely even) that some of the changes I describe below will be overwritten when you apply any update to ADFS. Make sure you:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Back up your original files, in case you need to revert to the stock config&lt;/li&gt;
&lt;li&gt;Have backup copies of your changes, in case they get stomped on by an update.&lt;/li&gt;
&lt;li&gt;Understand that you may have to re-do your changes after an update as the underlying files may change.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;These instructions are applicable to ADFS 2.0 with update rollup 2. I have not tested this with any other past or future version.&lt;/p&gt;
&lt;p&gt;Having covered all necessary behinds&amp;hellip;on with the show&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Adding a Logo&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Logo image file should be 600x100&lt;/li&gt;
&lt;li&gt;Save image file to c:\inetpub\adfs\ls\logo.jpg (or logo.png)&lt;/li&gt;
&lt;li&gt;Open c:\inetpub\adfs\ls\web.config in notepad&lt;/li&gt;
&lt;li&gt;Locate text&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt;&amp;lt;!--&lt;br /&gt; &amp;lt;add key="logo" value="logo.jpg" /&amp;gt;&lt;br /&gt;--&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Remove the "&amp;lt;!--" and "--&amp;gt;" to uncomment the section. Change filename to match the logo you saved.&lt;/li&gt;
&lt;li&gt;Save file and close&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/7266.adfslogin2.png"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/7266.adfslogin2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Change the "Example" Instructions&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Go to C:\inetpub\adfs\ls\App_GlobalResources&lt;/li&gt;
&lt;li&gt;Edit file CommonResources.en.resx in Notepad (replace the "en" with your localization code if not English)&lt;/li&gt;
&lt;li&gt;Locate text:&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt;&amp;lt;data name="UsernameExample" xml:space="preserve"&amp;gt;&lt;br /&gt; &amp;lt;value&amp;gt;&lt;span style="background-color: yellow;"&gt;Example: Domain\Username&lt;/span&gt;&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;lt;/data&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Edit &lt;span style="background-color: yellow;"&gt;this&lt;/span&gt; text to be what you want&lt;/li&gt;
&lt;li&gt;Save File and close&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Change the Instruction Text&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Edit CommonResources.en.resx in Notepad as per item above&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Locate text:&lt;/div&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;&amp;lt;data name="FormsSignInHeader" xml:space="preserve"&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt; &amp;lt;value&amp;gt;&lt;span style="background-color: yellow;"&gt;Type your user name and password.&lt;/span&gt;&amp;lt;/value&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;&amp;lt;/data&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Edit &lt;span style="background-color: yellow;"&gt;this&lt;/span&gt; text to be what you want&lt;/li&gt;
&lt;li&gt;Save file and close&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Change the Page Title&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Go to C:\inetpub\adfs\ls\App_GlobalResources&lt;/li&gt;
&lt;li&gt;Edit file CommonResources.en.resx in Notepad&lt;/li&gt;
&lt;li&gt;Locate text:&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt;&amp;lt;data name="FormsSignInPageTitle" xml:space="preserve"&amp;gt;&lt;br /&gt; &amp;lt;value&amp;gt;&lt;span style="background-color: yellow;"&gt;Sign In&lt;/span&gt;&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;lt;/data&amp;gt; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Edit &lt;span style="background-color: yellow;"&gt;this&lt;/span&gt; text to be what you want&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Save File and close&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/1300.adfslogin3.png"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/1300.adfslogin3.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Remove or Change the Hostname Header Above the Login Box&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Go to C:\inetpub\adfs\ls\MasterPages&lt;/li&gt;
&lt;li&gt;Edit MasterPage.master.cs in Notepad&lt;/li&gt;
&lt;li&gt;Locate text:&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt;{&lt;br /&gt; PageTitleLabel.Text = Page.Title;&lt;br /&gt; STSLabel.Text = &lt;span style="background-color: yellow;"&gt;FriendlyName&lt;/span&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Change &lt;span style="background-color: yellow;"&gt;this&lt;/span&gt; text to what you want. Your text MUST BE IN QUOTES. Like this&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt;STSLabel.Text = "Contoso Limited Single Sign On";&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Save File and close&lt;/div&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/4621.adfslogin4.png"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/4621.adfslogin4.png" alt="" border="0" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Add an "Authorized Use" disclaimer or other text at bottom of page&lt;/h1&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to C:\inetpub\adfs\ls\MasterPages&lt;/li&gt;
&lt;li&gt;Open MasterPage.Master in Notepad (&lt;strong&gt;not&lt;/strong&gt; MasterPage.Master.cs)&lt;/li&gt;
&lt;li&gt;Locate text at the end of the file:&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt; &amp;lt;div class="MainActionContainer"&amp;gt;&lt;br /&gt; &amp;lt;asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"&amp;gt;&lt;br /&gt; &amp;lt;/asp:ContentPlaceHolder&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Add a section here (added text hightlighted):&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt; &amp;lt;div class="MainActionContainer"&amp;gt;&lt;br /&gt; &amp;lt;asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"&amp;gt;&lt;br /&gt; &amp;lt;/asp:ContentPlaceHolder&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &lt;span style="background-color: yellow;"&gt;&amp;lt;div class="GroupLargeMargin"&amp;gt;&lt;br /&gt; &amp;lt;div class="TextSizeLarge"&amp;gt;&lt;br /&gt; &amp;lt;asp:Label ID="STSFooter" runat="server"&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Save file and close&lt;/li&gt;
&lt;li&gt;Edit file MasterPage.Master.cs in Notepad&lt;/li&gt;
&lt;li&gt;Locate text:&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt;protected void Page_Load( object sender, EventArgs e )&lt;br /&gt; {&lt;br /&gt; &lt;strong&gt; &lt;/strong&gt;PageTitleLabel.Text = Page.Title;&lt;br /&gt; STSLabel.Text = FriendlyName;&lt;br /&gt; } &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Add a line (added text highlighted)&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt;protected void Page_Load( object sender, EventArgs e )&lt;br /&gt; {&lt;br /&gt; &lt;strong&gt; &lt;/strong&gt;PageTitleLabel.Text = Page.Title;&lt;br /&gt; STSLabel.Text = FriendlyName;&lt;br /&gt; &lt;span style="background-color: yellow;"&gt;STSFooter.Text = "This is a secured, private computer system owned by Contoso. All Information contained on this system is deemed to be PRIVATE, PROPRIETARY, CONFIDENTIAL and the property of Contoso, Inc., its affiliates, divisions or subsidiaries. Unauthorized access or use is strictly prohibited. Any use of Contoso resources must be in compliance with Contoso policies including Electronic Mail/Communication; Information System Usage; Corporate Disclosure; Unauthorized Use of Software and the Code of Business Ethics. By using Contoso resources, you agree to comply with Contoso policies. Any unauthorized access to or use of Contoso Resources may be punishable in a court of law and may include termination of employment or contract with Contoso.&lt;/span&gt;&lt;span style="background-color: lime;"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;&lt;span style="background-color: yellow;"&gt;To protect your account from unauthorized access, Outlook Web Access automatically closes its connection to your mailbox after a period of inactivity. If your session ends, refresh your browser, and then log on again.";&lt;/span&gt;&lt;br /&gt; } &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;This text is all on one line. If you need or want a linefeed in the text use &amp;lt;br&amp;gt;, like &lt;span style="background-color: lime;"&gt;here&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;Save file and close&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/5808.adfslogin5.png"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/5808.adfslogin5.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;These are just a few of the theme elements you can fiddle with on the ADFS Proxy form. As you play with these, you will see other text tidbits you may want to adjust. Just be certain to follow my warnings and back everything up before and after your fiddling.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Steve&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3532046" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/stevenha/archive/tags/O365/">O365</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/ADFS/">ADFS</category></item><item><title>An ADFS Claims Rules Adventure</title><link>http://blogs.technet.com/b/stevenha/archive/2012/10/08/an-adfs-claims-rules-adventure.aspx</link><pubDate>Mon, 08 Oct 2012 16:58:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3524759</guid><dc:creator>Steve Halligan</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/stevenha/rsscomments.aspx?WeblogPostID=3524759</wfw:commentRss><comments>http://blogs.technet.com/b/stevenha/archive/2012/10/08/an-adfs-claims-rules-adventure.aspx#comments</comments><description>&lt;p&gt;&lt;span style="color: gray; font-size: 12pt;"&gt;&lt;span style="color: #ff0000; font-size: medium;"&gt;UPDATE:&amp;nbsp; A powershell based GUI script has been released to make some of this easier&lt;/span&gt; (&lt;/span&gt;&lt;a href="http://gallery.technet.microsoft.com/office/Client-Access-Policy-30be8ae2"&gt;http://gallery.technet.microsoft.com/office/Client-Access-Policy-30be8ae2&lt;/a&gt; )&amp;nbsp; &lt;span style="color: #ff0000; font-size: medium;"&gt;The story below can still serve as a useful tool to understanding what is going on behind the scenes and can help if the GUI doesn't meet your needs&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: gray; font-size: 12pt;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: gray; font-size: 12pt;"&gt;Notes from the field &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Customers can come up with some fairly complex requirements for access control. It can be a challenge to accommodate these requirements in an Office 365 world. The ADFS claims rule system in ADFS 2.0 UR1 provides some powerful options to implement these controls&amp;mdash;and some limitations.&lt;/p&gt;
&lt;p&gt;The requirements:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;No one shall access email via Outlook when off the corporate network&lt;/li&gt;
&lt;li&gt;Members of a specific security group may not use ActiveSync&lt;/li&gt;
&lt;li&gt;Members of a specific security group may not access OWA off the corporate network&lt;/li&gt;
&lt;li&gt;All OWA users must log in via a forms based login&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It is important to note that the rule processing system always processes all rules. It is NOT a first match system. Because of this, the first rule is most always an "allow everything" rule followed by additional rules that block some access. Schematically, it could look like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Allow everyone&lt;/li&gt;
&lt;li&gt;Block members of the group "Bigwigs" from access to OWA&lt;/li&gt;
&lt;li&gt;Allow the CEO access to OWA&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When the CEO attempts to log in to OWA: Rule #1 allows him, Rule #2 blocks him, and then Rule #3 allows him. It is the state of the last matching rule that determine his final outcome. If the CIO were to attempt to log in, he would only match rules 1 and 2 and therefore would be blocked.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5; font-size: 12pt;"&gt;&lt;strong&gt;Requirement #1: No one shall access email via Outlook when off the corporate network &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This is a fairly common requirement in a lot of enterprise Exchange environments. Security folks get a bit freaked out by the thought that a user could set up Outlook on a home machine. Meeting this challenge is pretty straightforward with ADFS 2.0 claims rules.&lt;/p&gt;
&lt;p&gt;First, let's review a bit how ADFS claims work in an Office 365 deployment. There are two flavors of ADFS claims requests: Active and Passive. When a claims request is created and submitted &lt;strong&gt;by the service (O365)&lt;/strong&gt; it is an "active" request. This seems kind of counter-intuitive since you (the client) don't have to do anything for these requests. The active/passive nature of the request refers to the participation of the _service_, not the client. Examples of O365 services that use active claims requests are Outlook 2007/2010 (RPC + HTTPS, EWS), Outlook 2011 for Mac (EWS), ActiveSync, Autodiscover and Lync Online.&lt;/p&gt;
&lt;p&gt;A passive claims request is when the service sends you off to get the claim yourself. The main examples of this in O365 are OWA and Sharepoint Online. When you try to log in to OWA in O365 (and you are using federated identity) your browser is redirected to your ADFS endpoint. There you provide your credentials (either via a web form, basic authentication pop-up or integrated auth.), get your token and then return to OWA with your token in hand.&lt;/p&gt;
&lt;p&gt;Back to the issue at hand: Blocking Outlook when client is not connected to the corporate network. To translate that into ADFS speak&amp;mdash;We need to block active ADFS claims for the RPC+HTTPS and EWS services if the IP address doesn't match a known set of corporate addresses.&lt;/p&gt;
&lt;p&gt;Logically, the rule will look like this:&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;If { &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ClientApplication is RPC &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Or &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ClientApplication is EWS} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AND &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ClaimType is Active &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AND &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ClientIPAddress is not in &amp;lt;corporate ip address list&amp;gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;THEN DENY THE CLAIM &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now let's translate that to ADFS Claim Rule language:&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy&lt;/a&gt;"]) &amp;amp;&amp;amp; &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path&lt;/a&gt;", Value == "/adfs/services/trust/2005/usernamemixed"]) &amp;amp;&amp;amp; &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-client-application"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-client-application&lt;/a&gt;", Value == "Microsoft.Exchange.RPC|Microsoft.Exchange.WebServices"]) &amp;amp;&amp;amp; &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;NOT exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-forwarded-client-ip"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-forwarded-client-ip&lt;/a&gt;", Value =~ "&amp;lt;public NAT addresses&amp;gt;"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;=&amp;gt; issue(Type = "&lt;a href="http://schemas.microsoft.com/authorization/claims/deny"&gt;http://schemas.microsoft.com/authorization/claims/deny&lt;/a&gt;", Value = "true"); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Makes perfect sense, right? Oh&amp;hellip;it doesn't? Allow me to break it down:&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy&lt;/a&gt;"]) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The 'Type' x-ms-proxy exists. This simply means that the claim came through an ADFS Proxy server (or other compatible proxy). Note: we are not checking the 'value' for this type, just that the type exists.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path&lt;/a&gt;", Value == "/adfs/services/trust/2005/usernamemixed"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The type x-ms-endpoint-absolute-path exists and has a value of usernamemixed. This is the name of the endpoint for _Active_ ADFS Claims. Summary: This is an active ADFS claim.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-client-application"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-client-application&lt;/a&gt;", Value == ""Microsoft.Exchange.RPC|Microsoft.Exchange.WebServices"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;ClientApplication is RPC or WebServices. We can use this 'or' (using the '|' character) syntax to check the value field.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt; background-color: #dfdfdf;"&gt;NOT exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-forwarded-client-ip"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-forwarded-client-ip&lt;/a&gt;", Value =~ "\b192\.168\.4\.([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-5][0-9])\b|\b10\.3\.4\.5\b"]) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The value for the type x-ms-forwarded-client-ip has a value that DOES NOT MATCH the regular expression "&amp;lt;public NAT addresses&amp;gt;". That brings up two important questions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Where does that "x-ms-forwarded-client-ip" come from and what values should I expect to see there?&lt;/li&gt;
&lt;li&gt;What does the format of the regular expression look like?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;According to TechNet:&lt;/p&gt;
&lt;p&gt;"This AD FS claim represents a "best attempt" at ascertaining the IP address of the user (for example, the Outlook client) making the request. This claim can contain multiple IP addresses, including the address of every proxy that forwarded the request. This claim is populated from an HTTP header that is currently only set by Exchange Online, which populates the header when passing the authentication request to AD FS."&lt;/p&gt;
&lt;p&gt;(&lt;a href="http://technet.microsoft.com/en-us/library/hh526961(v=ws.10).aspx)"&gt;http://technet.microsoft.com/en-us/library/hh526961(v=ws.10).aspx)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So, the value is going to be the border IP address that Exchange Online (EXO) sees for the client. That would be either the border firewall doing NAT/PAT or the border Proxy server. Exchange Online add this IP to the ADFS claim request. Perfect for our Outlook scenario here: Outlook attempt to connect to EXO, EXO builds up a claims request that includes the client IP and heads out to the ADFS endpoint to submit the request.&lt;/p&gt;
&lt;p&gt;The second question is a bit easier (or perhaps a bit harder&amp;mdash;regular expressions can get complicated) due to the fact that the regular expression format follows the general rules for regular expressions. The Internet is full of regular expression examples to filter IP addresses. For example, let's say that your network has one block of addresses in use in a NAT pool: 192.168.4.0-192.168.4.255. You also have one satellite office with a single public IP address: 10.3.4.5. An expression you may use could be:&lt;/p&gt;
&lt;p&gt;"\b192\.168\.4\.([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-5][0-9])\b|\b10\.3\.4\.5\b"&lt;/p&gt;
&lt;p&gt;To break that down:&lt;/p&gt;
&lt;p&gt;\b192\.168\.4\.([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-5][0-9])\b applies to the 192.168.4.0-255 network.&lt;/p&gt;
&lt;p&gt;\b192\.168\.4\. matches 192.168.4.&lt;/p&gt;
&lt;p&gt;[1-9] matches address ending in 1-9&lt;/p&gt;
&lt;p&gt;[1-9][0-9] matches 10-99&lt;/p&gt;
&lt;p&gt;1[0-9][0-9] matches 100-199&lt;/p&gt;
&lt;p&gt;2[0-5][0-9] matches 200-259 (yeah&amp;hellip;I know a few more than needed)&lt;/p&gt;
&lt;p&gt;The '|' represent "or"&lt;/p&gt;
&lt;p&gt;\b10\.3\.4\.5\b applies to the 10.3.4.5 address.&lt;/p&gt;
&lt;p&gt;These can get tricky. I recommend you use a regular expression verification tool and test.&lt;/p&gt;
&lt;p&gt;Finally, if ALL of these conditions are true:&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;=&amp;gt; issue(Type = "&lt;a href="http://schemas.microsoft.com/authorization/claims/deny"&gt;http://schemas.microsoft.com/authorization/claims/deny&lt;/a&gt;", Value = "true"); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We deny the claim.&lt;/p&gt;
&lt;p&gt;If any one of the elements of the rule evaluate to false, the entire rule is skipped. So, if the client IS coming from one of the addresses that match the regular expression, they do not match this rule.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5;"&gt;&lt;strong&gt;&lt;em&gt;Requirement #2: Members of a specific security group may not use ActiveSync &lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The previous example illustrated how to allow or block users based upon where they are. This is a simple example of how to block users based upon who they are.&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="color: #000000; font-family: Courier New; font-size: 10pt;"&gt;exists([Type == "http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy"]) &amp;amp;&amp;amp; &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="color: #000000; font-family: Courier New; font-size: 10pt;"&gt;exists([Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", Value =~ "Group SID value of allowed AD group"]) &amp;amp;&amp;amp; &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="color: #000000; font-family: Courier New; font-size: 10pt;"&gt;exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-client-application"&gt;&lt;span style="color: #000000;"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-client-application&lt;/span&gt;&lt;/a&gt;, Value == "Microsoft.Exchange.ActiveSync"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="color: #000000; font-family: Courier New; font-size: 10pt;"&gt;=&amp;gt; issue(Type = "http://schemas.microsoft.com/authorization/claims/deny", Value = "true"); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;The new element here from the previous example is the "groupsid" type. Yeah, you need to dive into AD and hunt down the SID of the group in question. As is hinted by the "=~" operator, you could create a regular expression that would match more than one group. You could also use the "==" operator and the "|" to do a multiple "or" match. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;That one was easy&amp;mdash;sets us up well for the next. Which gets a bit&amp;hellip;complicated. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5;"&gt;&lt;strong&gt;&lt;em&gt;Requirement #3: Members of a specific group may only use OWA on the corporate network &lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;We built a rule above that did something very similar for Outlook, couldn't we just add on or slightly alter that rule? Nope, we can't. OWA login uses a passive ADFS claim, so the behavior is different. With Outlook, or other active claims, all requests come from O365 and land on the external ADFS proxy. To determine if a user is internal or external, we have to examine the &lt;/span&gt;"x-ms-forwarded-client-ip" value. With a passive claim request, like OWA, the client's browser will be connecting directly to the ADFS endpoint (sts.contoso.com for example). So, we can control who gets in based upon where they are asking. If they ask the external proxies (and they are in the specified group) we say "no". If they ask the internal ADFS servers we say "yes".&lt;span style="color: #5b9bd5;"&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/7563.OWAADFSv1.png"&gt;&lt;img alt="" src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/7563.OWAADFSv1.png" border="0" /&gt;&lt;/a&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/3252.OWAADFS.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The rule to accomplish this would look something like this:&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy&lt;/a&gt;"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;amp;&amp;amp; exists([Type == "&lt;a href="http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid"&gt;http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid&lt;/a&gt;", Value =~ "S-1-5-21-299502267-1364589140-1177238915-114465"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;amp;&amp;amp; exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path&lt;/a&gt;", Value == "/adfs/ls/"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;=&amp;gt; issue(Type = "&lt;a href="http://schemas.microsoft.com/authorization/claims/deny"&gt;http://schemas.microsoft.com/authorization/claims/deny&lt;/a&gt;", Value = "true"); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Line 1: Request went through a proxy&lt;/p&gt;
&lt;p&gt;Line 2: User is a member of the specified group&lt;/p&gt;
&lt;p&gt;Line 3: This is a passive claim to the /adfs/ls/ endpoint&lt;/p&gt;
&lt;p&gt;Line 4: Deny&lt;/p&gt;
&lt;p&gt;If they hit the internal ADFS servers directly, line 1 would be false and they would be allowed in.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #5b9bd5;"&gt;&lt;strong&gt;&lt;em&gt;Requirement #4: Oh&amp;hellip;your solution to #3 doesn't work because we want everyone to use forms-based authentication &lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;Well&amp;hellip;shoot. Easy enough to fix, right? Send everyone to the ADFS proxy and add in a line to the above rule that specifies which client IP addresses are allowed. Something like: &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: red;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy&lt;/a&gt;"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: red;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;amp;&amp;amp; exists([Type == "&lt;a href="http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid"&gt;http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid&lt;/a&gt;", Value =~ "S-1-5-21-299502267-1364589140-1177238915-114465"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: red;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;amp;&amp;amp; exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path&lt;/a&gt;", Value == "/adfs/ls/"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: red;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt; background-color: #dfdfdf;"&gt;&amp;amp;&amp;amp; NOT exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-forwarded-client-ip"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-forwarded-client-ip&lt;/a&gt;", Value =~ "\b192\.168\.4\.([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-5][0-9])\b|\b10\.3\.4\.5\b"])&lt;/span&gt;&lt;/p&gt;
&lt;p style="background: red;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;=&amp;gt; issue(Type = "&lt;a href="http://schemas.microsoft.com/authorization/claims/deny"&gt;http://schemas.microsoft.com/authorization/claims/deny&lt;/a&gt;", Value = "true"); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;I hope the blaring red background illustrates the point that this will not work. Why not? Scroll up a bit to the section on blocking Outlook based on IP address. Notice what fills in that x-ms-forwarded-client-ip? EXO. In this example we are dealing with _passive_ ADFS claims. EXO is not creating this claim&amp;mdash;the user is hitting the ADFS login page directly. If you turn on this rule, everyone in the specified group will be blocked no matter where they are coming from. The x-ms-forwarded-client-ip type does not exist at all, so that line will evaluate to true. In order to make it false (and thereby stopping the deny rule from firing on someone) the element would need to exist AND the value need to match the regular expression. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;If we can't use the client's source IP as a filter, how can we solve this problem? &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;The answer lies in an ADFS claim element that we have been checking all along, but not checking it fully. Let's look at the debug log (for more on turning on debugging for ADFS see: &lt;a href="http://technet.microsoft.com/en-us/library/adfs2-troubleshooting-configuring-computers(v=WS.10).aspx"&gt;&lt;/a&gt;http://technet.microsoft.com/en-us/library/adfs2-troubleshooting-configuring-computers(v=WS.10).aspx ). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;Event ID 151 AD FS 2.0 Tracing: &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;lt;Claims&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;ClaimType http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname Value CONTOSO\USER1 ValueType http://www.w3.org/2001/XMLSchema#string Issuer AD AUTHORITY OriginalIssuer AD AUTHORITY &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;ClaimType http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name Value CONTOSO\USER1 ValueType http://www.w3.org/2001/XMLSchema#string Issuer AD AUTHORITY OriginalIssuer AD AUTHORITY &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;ClaimType http://schemas.microsoft.com/ws/2008/06/identity/claims/primarysid Value S-1-5-21-3640651473-4051545122-2937135913-1136 ValueType http://www.w3.org/2001/XMLSchema#string Issuer AD AUTHORITY OriginalIssuer AD AUTHORITY &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;ClaimType http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid Value S-1-5-15 ValueType http://www.w3.org/2001/XMLSchema#string Issuer AD AUTHORITY OriginalIssuer AD AUTHORITY Value S-1-5-11 Value S-1-5-2 Value S-1-5-32-545 Value S-1-1-0 Value S-1-5-21-3640651473-4051545122-2937135913-513 &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;ClaimType http://schemas.microsoft.com/ws/2008/06/identity/claims/primarygroupsid Value S-1-5-21-3640651473-4051545122-2937135913-513 ValueType http://www.w3.org/2001/XMLSchema#string Issuer AD AUTHORITY OriginalIssuer AD AUTHORITY &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;ClaimType http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod Value http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password ValueType http://www.w3.org/2001/XMLSchema#string Issuer LOCAL AUTHORITY OriginalIssuer LOCAL AUTHORITY &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;ClaimType http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationinstant Value 2012-04-19T17:32:41.459Z ValueType http://www.w3.org/2001/XMLSchema#dateTime Issuer AD AUTHORITY OriginalIssuer AD AUTHORITY &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;strong&gt;ClaimType http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy Value adfs01p&lt;/strong&gt;&lt;/span&gt; ValueType http://www.w3.org/2001/XMLSchema#string Issuer CLIENT CONTEXT OriginalIssuer CLIENT CONTEXT &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;lt;/Claims&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;We have been checking for the existence of the x-ms-proxy element, but we haven't looked into its value. The value identifies the name of the proxy server that the request passed through. What if we could tell if a user was internal or external based upon which proxy server they came through? &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/4405.OWAADFS.png"&gt;&lt;img alt="" src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-33/4405.OWAADFS.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;With this change, internal OWA users will land on internal ADFS Proxy servers and external OWA users will land on external ADFS Proxy servers. That will allow us to add a rule like this: &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy&lt;/a&gt;", Value =~ "\badfsp[0-9][0-9]\b"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;amp;&amp;amp; exists([Type == "&lt;a href="http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid"&gt;http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid&lt;/a&gt;", Value =~ "S-1-5-21-299502267-1364589140-1177238915-114465"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;amp;&amp;amp; exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path&lt;/a&gt;", Value == "/adfs/ls/"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;=&amp;gt; issue(Type = "&lt;a href="http://schemas.microsoft.com/authorization/claims/deny"&gt;http://schemas.microsoft.com/authorization/claims/deny&lt;/a&gt;", Value = "true"); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Line 1: User is coming through an ADFS Proxy and that proxy has a name that matches ADFSP##&lt;/p&gt;
&lt;p&gt;Line 2: User is in the specified group&lt;/p&gt;
&lt;p&gt;Line 3: User is hitting the passive endpoint&lt;/p&gt;
&lt;p&gt;Line 4: Deny the claim&lt;/p&gt;
&lt;p&gt;If a user in the specified group presents a claim to ADFS from outside the network, all elements of this rule will be true and the claim will be denied. If the same user is inside the network and is using one of the internal proxies, line 1 will be false (the proxy name will not match ADFSP##) and the claim will be allowed.&lt;/p&gt;
&lt;p&gt;For illustration purposes, we can express the same thing in a slightly different way:&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="background-color: yellow;"&gt;NOT&lt;/span&gt; exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-proxy&lt;/a&gt;", Value =~ "\badfsp&lt;span style="background-color: yellow;"&gt;i&lt;/span&gt;[0-9][0-9]\b"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;amp;&amp;amp; exists([Type == "&lt;a href="http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid"&gt;http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid&lt;/a&gt;", Value =~ "S-1-5-21-299502267-1364589140-1177238915-114465"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&amp;amp;&amp;amp; exists([Type == "&lt;a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path&lt;/a&gt;", Value == "/adfs/ls/"]) &lt;/span&gt;&lt;/p&gt;
&lt;p style="background: #dfdfdf;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;=&amp;gt; issue(Type = "&lt;a href="http://schemas.microsoft.com/authorization/claims/deny"&gt;http://schemas.microsoft.com/authorization/claims/deny&lt;/a&gt;", Value = "true"); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;Line 1: The user is NOT coming through an ADFS Proxy that matches ADFSPI## &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;&amp;hellip; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;&lt;strong&gt;&lt;em&gt;While you may not need to meet access control requirements this complex, I hope that these notes provide some enlightenment into the ADFS claim rule language.&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3524759" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/stevenha/archive/tags/O365/">O365</category><category domain="http://blogs.technet.com/b/stevenha/archive/tags/ADFS/">ADFS</category></item></channel></rss>