<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Circular Logging Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/circularlogging/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/circularlogging/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:24:10 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Name resolution for the name outlook.office365.com timed out after none of the configured DNS servers responded.</title>
      <link>https://docs.microsoft.com/archive/blogs/circularlogging/name-resolution-for-the-name-outlook-office365-com-timed-out-after-none-of-the-configured-dns-servers-responded</link>
      <pubDate>Fri, 01 Apr 2016 14:49:51 GMT</pubDate>
      <dc:creator><![CDATA[Joel Ricketts - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/circularlogging/?p=111</guid>
      <description><![CDATA[Users may report they are unable to open their Exchange Online hosted mailbox with Outlook or...]]></description>
      <content:encoded><![CDATA[<div>Users may report they are unable to open their Exchange Online hosted mailbox with Outlook or Outlook Web Access and the follow event may be logged multiple times in the Windows system log. Users reports they have no other issues accessing other websites and your DNS team reports there are no issues with the DNS servers.</div>
<div></div>
<div></div>
<div>Log Name:      System
Source:        Microsoft-Windows-DNS-Client
Date:          3/27/2016 11:38:07 AM
Event ID:      1014
Task Category: (1014)
Level:         Warning
Keywords:      (268435456)
User:          NETWORK SERVICE
Computer:      Windows.contoso.com
Description:
Name resolution for the name outlook.office365.com timed out after none of the configured DNS servers</div>
<div></div>
<div></div>
<div>Cause:</div>
<div>The time to live (TTL) on the outlook.office365.com DNS record is 5 minutes. Because of this the Windows will refresh this record at the interval of 5 minutes. Third party malware and internet protection suites have been found to block request at this frequent of an interval, in turn preventing users from using Outlook or Outlook Web Access to connect to their Exchange Online mailbox.</div>
<div></div>
<div></div>
<div>Resolution:</div>
<div>Work with third party vendor to setup proper exclusions for outlook.office365.com, or disable third party malware/internet protection suites.</div>]]></content:encoded>
    </item>
    <item>
      <title>"550 5.7.512 Access denied, message must be RFC 5322 section 3.6.2 compliant and include a valid From address"</title>
      <link>https://docs.microsoft.com/archive/blogs/circularlogging/101</link>
      <pubDate>Fri, 01 Apr 2016 14:43:59 GMT</pubDate>
      <dc:creator><![CDATA[Joel Ricketts - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/circularlogging/?p=101</guid>
      <description><![CDATA[Email sent from on premise application servers and bound for office 365 recipients fails with the...]]></description>
      <content:encoded><![CDATA[Email sent from on premise application servers and bound for office 365 recipients fails with the following error:

<strong>"550 5.7.512 Access denied, message must be RFC 5322 section 3.6.2 compliant and include a valid From address"</strong>

In the logs of your sending server you may see an SMTP conversation similar to:
<p style="text-align: left"><em>220 BL2FFO11FD032.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Mon, 28 Mar 2016 22:55:58 +0000 </em></p>
<p style="text-align: left"><em>ehlo smtp.contoso.com </em></p>
<p style="text-align: left"><em>250-BL2FFO11FD032.mail.protection.outlook.com Hello [167.220.148.211] 250-SIZE 157286400</em></p>
<p style="text-align: left"><em> 250-PIPELINING </em></p>
<p style="text-align: left"><em>250-DSN </em></p>
<p style="text-align: left"><em>250-ENHANCEDSTATUSCODES </em></p>
<p style="text-align: left"><em>250-STARTTLS </em></p>
<p style="text-align: left"><em>250-8BITMIME </em></p>
<p style="text-align: left"><em>250-BINARYMIME</em></p>
<p style="text-align: left"><em> 250 CHUNKING </em></p>
<p style="text-align: left"><em>MAIL FROM: &lt;&gt;</em></p>
<p style="text-align: left"><em> 250 2.1.0 Sender OK</em></p>
<p style="text-align: left"><em> RCPT TO: UserMailbox@contoso.com</em></p>
<p style="text-align: left"><em> 250 2.1.5 Recipient OK </em></p>
<p style="text-align: left"><em>data </em></p>
<p style="text-align: left"><em>354 Start mail input; end with &lt;CRLF&gt;.&lt;CRLF&gt; </em></p>
<p style="text-align: left"><em>Hello World!</em></p>
<p style="text-align: left"><em> . </em></p>
<p style="text-align: left"><em><strong>550 5.7.512 Access denied, message must be RFC 5322 section 3.6.2 compliant and include a valid From address</strong></em></p>
In the above sample SMTP communication you can see the "MAIL FROM" SMTP verb was submitted with a blank from address.

<strong>Resolution:</strong>

Application generating email must enter a valid from address.

A valid format would be as follows:

<em>                 From: “No Reply” &lt;NoReply@contoso.com&gt;</em>

<em>                -or-</em>

<em>                From: </em><em>NoReply</em><em>@contoso.com</em>

&nbsp;

Blank from fields or anything formatted differently from above could be rejected.]]></content:encoded>
    </item>
    <item>
      <title>General Guidance on combating spoofing</title>
      <link>https://docs.microsoft.com/archive/blogs/circularlogging/general-guidance-on-combating-spoofing</link>
      <pubDate>Wed, 06 Jan 2016 09:04:42 GMT</pubDate>
      <dc:creator><![CDATA[Joel Ricketts - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/circularlogging/2016/01/06/general-guidance-on-combating-spoofing/</guid>
      <description><![CDATA[As an Escalation Engineer for Exchange Online&nbsp;we get lots of questions on how to stop email...]]></description>
      <content:encoded><![CDATA[<p>As an Escalation Engineer for Exchange Online&nbsp;we get lots of questions on how to stop email spoofing.&nbsp;It is a very broad topic and there&nbsp;are a number of things that can be done. Below is sone&nbsp;general guidance I provide to my customers when this topic comes up.</p>
<p>Last updated January 6th 2016</p>
<p>=================================================================</p>
<p>&nbsp;Combating email spoofing can be tricky, what is right for another organization may not necessarily be right for your organization; moreover, <span style="text-decoration:underline;"><strong>it&rsquo;s always important to understand</strong> <strong>you will never be able to block 100% of spoof attacks 100% of the time</strong></span>.</p>
<p>&nbsp;</p>
<p>We recommend, when developing the strategy that is best for you, to look at these four areas:</p>
<p>&nbsp;</p>
<p><span style="font-size:medium;text-decoration:underline;"><strong>SPF/DKIM/DMARC</strong></span></p>
<p>The link below provides guidance on Using DMARC in Office 365</p>
<p><a href="/controlpanel/blogs/posteditor.aspx/H&lt;a%20href=&quot;http:/blogs.msdn.com/b/tzink/archive/2014/12/03/using-dmarc-in-office-365.aspx&quot;&gt;ttp:/blogs.msdn.com/b/tzink/archive/2014/12/03/using-dmarc-in-office-365.aspx&lt;/a&gt;&amp;nbsp;">https://blogs.msdn.com/b/tzink/archive/2014/12/03/using-dmarc-in-office-365.aspx&nbsp;</a></p>
<p></p>
<p>DKIM outbound signing is now enabled for your default&nbsp;<em>onmicrosoft.com</em> domain. But in order to enable for vanity domains in which you manage the DNS you must add the two CNAME records as outlined in the article below.</p>
<div class="WordSection1">
<p><a href="https://blogs.msdn.com/b/tzink/archive/2015/10/08/manually-hooking-up-dkim-signing-in-office-365.aspx">https://blogs.msdn.com/b/tzink/archive/2015/10/08/manually-hooking-up-dkim-signing-in-office-365.aspx</a></p>
</div>
<p></p>
<p>External DNS records required for SPF</p>
<p>&nbsp;&nbsp; <a href="https://support.office.com/en-us/article/External-Domain-Name-System-records-for-Office-365-c0531a6f-9e25-4f2d-ad0e-a70bfef09ac0#BKMK_SPFrecords">https://support.office.com/en-us/article/External-Domain-Name-System-records-for-Office-365-c0531a6f-9e25-4f2d-ad0e-a70bfef09ac0#BKMK_SPFrecords</a></p>
<p>&nbsp;</p>
<p>Customize an SPF record to validate outbound email sent from your domain</p>
<p><a href="https://technet.microsoft.com/en-us/library/dn789058(v=exchg.150).aspx">https://technet.microsoft.com/en-us/library/dn789058(v=exchg.150).aspx</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-size:medium;text-decoration:underline;"><strong>User Education</strong></span></p>
<p>Even with the most restrictive settings it is import to educate your user community to be able to spot red flags of spoofing attempts. If for whatever reason your user gets an email from itsupport@cont0so.com&nbsp;&nbsp;&nbsp;&nbsp; they should be able to identify it does not look like legitimate email from your IT support staff.</p>
<p>&nbsp;</p>
<p><span style="font-size:medium;text-decoration:underline;"><strong>Connection/SPAM Filters/Transport Rules</strong></span></p>
<p>The links below provide in depth guidance on configuring your SPAM filters and advanced features that can help fine tune them to your specific needs</p>
<p>&nbsp;</p>
<p>Configure the connection filter policy</p>
<p>** You can add IP&nbsp; here to bypass filtering for email from these trusted sources if, and only if, those sources are already scanning/filtering mail before sending it on.</p>
<p><a href="https://technet.microsoft.com/en-us/library/jj200718(v=exchg.150).aspx">https://technet.microsoft.com/en-us/library/jj200718(v=exchg.150).aspx</a></p>
<p>&nbsp;</p>
<p>Configure your spam filter policies</p>
<p><a href="https://technet.microsoft.com/en-us/library/jj200684(v=exchg.150).aspx">https://technet.microsoft.com/en-us/library/jj200684(v=exchg.150).aspx</a>&nbsp;</p>
<p>&nbsp;</p>
<p>Advanced Spam Filtering Options</p>
<p>**Proceed with caution setting some of the features and they can be very restrictive and generate a lot of false positives, especially the option to quarantine SPF hard fail.</p>
<p><a href="https://technet.microsoft.com/en-us/library/jj200750(v=exchg.150).aspx">https://technet.microsoft.com/en-us/library/jj200750(v=exchg.150).aspx</a>&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p>(Not) Using the Additional Spam Filtering option for SPF hard fail to block apparently internal email spoofing</p>
<p><a href="https://blogs.msdn.com/b/tzink/archive/2015/07/21/not-using-the-additional-spam-filtering-option-for-spf-hard-fail-to-block-apparently-internal-email-spoofing.aspx">https://blogs.msdn.com/b/tzink/archive/2015/07/21/not-using-the-additional-spam-filtering-option-for-spf-hard-fail-to-block-apparently-internal-email-spoofing.aspx</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-size:medium;text-decoration:underline;"><strong>Contingency/Action plans</strong></span></p>
<p>As stated earlier you will never be able to block 100% of malicious email 100% of the time. When malicious/spoofed email does get though, develop an action plan including but not limited to:</p>
<p>&nbsp;</p>
<p>&bull;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resetting the password on any compromised accounts</p>
<p>&bull;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Running Malware/virus scans on affected machines</p>
<p>&bull;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Using the Search-Mailbox to seek out and delete identified malicious email - <a href="https://technet.microsoft.com/en-us/library/dd298173(v=exchg.150).aspx">https://technet.microsoft.com/en-us/library/dd298173(v=exchg.150).aspx</a>&nbsp;&nbsp;&nbsp;</p>
<p>&bull;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Using Transport rules to help suppress the subsequent delivery of identified messages.</p>
<p>&bull;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Using transport rules to block executable content:&nbsp; <a href="https://blogs.msdn.com/b/tzink/archive/2014/04/08/blocking-executable-content-in-office-365-for-more-aggressive-anti-malware-protection.aspx">https://blogs.msdn.com/b/tzink/archive/2014/04/08/blocking-executable-content-in-office-365-for-more-aggressive-anti-malware-protection.aspx</a>&nbsp;</p>
<p>&bull;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Submit sample messaged to Microsoft for analysis <a href="https://technet.microsoft.com/en-us/library/jj200769.aspx">https://technet.microsoft.com/en-us/library/jj200769.aspx</a></p>
<p>&bull;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Submit suspected malware to our protection center <a href="https://www.microsoft.com/security/portal/submission/submit.aspx">https://www.microsoft.com/security/portal/submission/submit.aspx</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Some additional related links:</p>
<p>&nbsp;</p>
<p>Anti-spam and anti-malware protection</p>
<p><a href="https://technet.microsoft.com/en-us/library/jj200731(v=exchg.150).aspx">https://technet.microsoft.com/en-us/library/jj200731(v=exchg.150).aspx</a></p>
<p>&nbsp;</p>
<p>Best practices for configuring EOP</p>
<p><a href="https://technet.microsoft.com/en-us/library/jj723164(v=exchg.150).aspx">https://technet.microsoft.com/en-us/library/jj723164(v=exchg.150).aspx</a></p>
<p>&nbsp;</p>
<p>Terry Zink: Security Talk. Terry is one of our program managers EOP.</p>
<p><a href="https://blogs.msdn.com/b/tzink/">https://blogs.msdn.com/b/tzink/</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Using EWS impersonation and PowerShell to log into an Exchange Online Mailbox</title>
      <link>https://docs.microsoft.com/archive/blogs/circularlogging/using-ews-impersonation-and-powershell-to-log-into-an-exchange-online-mailbox</link>
      <pubDate>Tue, 10 Feb 2015 14:05:00 GMT</pubDate>
      <dc:creator><![CDATA[Joel Ricketts - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/circularlogging/2015/02/10/using-ews-impersonation-and-powershell-to-log-into-an-exchange-online-mailbox/</guid>
      <description><![CDATA[&nbsp;Below is very basic PowerShell sample that will log into a mailbox in Exchange Online with...]]></description>
      <content:encoded><![CDATA[<p><span style="color:#006400;font-family:verdana,geneva;font-size:small;"><span style="color:#006400;"><span style="color:#006400;">&nbsp;<span style="color:#000000;">Below is very basic PowerShell sample that will log into a mailbox in Exchange Online with another account which has the right to impersonate other mailboxes in your tennant. This can be very useful when there is a need to connect to multiple mailboxes in Exchange Online to perform various tasks. Using this method will help (but not totally) mitigate being throttled by Exchange Online in the event you are preforming tasks against a large number of mailboxes</span></span></span></span></p>
<p><span style="color:#006400;font-family:verdana,geneva;font-size:small;"><span style="color:#006400;"><span style="color:#006400;"><span style="color:#000000;">&nbsp;</span></span></span></span></p>
<p><span style="color:#006400;font-family:Lucida Console;font-size:small;"><span style="color:#006400;font-family:Lucida Console;"><span style="color:#006400;font-family:Lucida Console;"><span style="color:#000000;"><span style="font-family:verdana,geneva;">As stated the sample below is very basic and will Impersonate the desired mailbox and list some very basic information on the inbox It is a great start or foundation for any script you need to write where impersonation is necessary.</span><br /></span></span></span></span></p>
<p><span style="color:#006400;font-family:Lucida Console;font-size:small;"><span style="color:#006400;font-family:Lucida Console;"><span style="color:#006400;font-family:Lucida Console;">&nbsp;</span></span></span></p>
<p><span style="color:#006400;font-family:Lucida Console;font-size:x-small;"><span style="color:#006400;font-family:Lucida Console;"><span style="color:#006400;font-family:Lucida Console;">## Define UPN of the Account that has impersonation rights</span></span></span></p>
<p><span style="font-size:x-small;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$AccountWithImpersonationRights</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">=</span></span></span><span style="color:#993300;"><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> &quot;AccountWithImpersonationRights</span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">@contoso.onmicrosoft.com&quot;</span></span></span></span></span></p>
<p><span style="color:#00ff00;font-size:x-small;"><span style="color:#008000;">##Define the SMTP Address of the mailbox to impersonate</span><br /></span></p>
<p><span style="font-size:x-small;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$MailboxToImpersonate</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">=</span></span></span><span style="color:#993300;"><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> &quot;</span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"><span style="color:#993300;">MailboxToImpersonate@contoso.onmicrosoft.com&quot;</span></span></span></span></span></span></p>
<p><span style="color:#008000;font-size:x-small;">## Load Exchange web services DLL</span></p>
<p><span style="color:#008000;font-size:x-small;">## Download here if not present: https://go.microsoft.com/fwlink/?LinkId=255472</span></p>
<p><span style="font-size:x-small;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$dllpath</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">=</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;"><span style="color:#8b0000;font-family:Lucida Console;"><span style="color:#8b0000;font-family:Lucida Console;">&quot;C:\Program Files\Microsoft\Exchange\Web Services\2.2\Microsoft.Exchange.WebServices.dll&quot;</span></span></span></span></p>
<p><span style="font-size:x-small;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;">Import-Module</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$dllpath</span></span></span></span></p>
<p><span style="color:#008000;font-size:x-small;">## Set Exchange Version</span></p>
<p><span style="font-size:x-small;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$ExchangeVersion</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">=</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">[</span></span></span><span style="color:#008080;font-family:Lucida Console;"><span style="color:#008080;font-family:Lucida Console;"><span style="color:#008080;font-family:Lucida Console;">Microsoft.Exchange.WebServices.Data.ExchangeVersion</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">]::</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">Exchange2013 </span></span></span></p>
<p><span style="color:#008000;font-size:x-small;">## Create Exchange Service Object</span></p>
<p><span style="font-size:x-small;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$service</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">=</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;">New-Object</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#8a2be2;font-family:Lucida Console;"><span style="color:#8a2be2;font-family:Lucida Console;"><span style="color:#8a2be2;font-family:Lucida Console;">Microsoft.Exchange.WebServices.Data.ExchangeService</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">(</span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$ExchangeVersion</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">) </span></span></span></p>
<p><span style="color:#008000;font-size:x-small;">#Get valid Credentials using UPN for the ID that is used to impersonate mailbox</span></p>
<p><span style="font-size:x-small;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$psCred</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">=</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;">Get-Credential</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span></span></p>
<p><span style="font-size:x-small;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$creds</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">=</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;">New-Object</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#8a2be2;font-family:Lucida Console;"><span style="color:#8a2be2;font-family:Lucida Console;"><span style="color:#8a2be2;font-family:Lucida Console;">System.Net.NetworkCredential</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">(</span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$psCred</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">.</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">UserName</span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">.</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">ToString()</span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">,</span></span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$psCred</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">.</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">GetNetworkCredential()</span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">.</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">password</span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">.</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">ToString()) </span></span></span></p>
<p><span style="font-size:x-small;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$service</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">.</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">Credentials </span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">=</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$creds</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span></span></p>
<p><span style="color:#008000;font-size:x-small;">## Set the URL of the CAS (Client Access Server)</span></p>
<p><span style="font-size:x-small;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$service</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">.</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">AutodiscoverUrl(</span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$AccountWithImpersonationRights</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">,</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">{</span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$true</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">})</span></span></span></p>
<p><span style="color:#008000;font-size:x-small;">##Login to Mailbox with Impersonation</span></p>
<p><span style="font-size:x-small;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;">Write-Host</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;"><span style="color:#8b0000;font-family:Lucida Console;"><span style="color:#8b0000;font-family:Lucida Console;">&#39;Using &#39;</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$AccountWithImpersonationRights</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;"><span style="color:#8b0000;font-family:Lucida Console;"><span style="color:#8b0000;font-family:Lucida Console;">&#39; to Impersonate &#39;</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$MailboxToImpersonate</span></span></span></span></p>
<p><span style="font-size:x-small;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$service</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">.</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">ImpersonatedUserId </span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">=</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;">New-Object</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#8a2be2;font-family:Lucida Console;"><span style="color:#8a2be2;font-family:Lucida Console;"><span style="color:#8a2be2;font-family:Lucida Console;">Microsoft.Exchange.WebServices.Data.ImpersonatedUserId</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">(</span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">[</span></span></span><span style="color:#008080;font-family:Lucida Console;"><span style="color:#008080;font-family:Lucida Console;"><span style="color:#008080;font-family:Lucida Console;">Microsoft.Exchange.WebServices.Data.ConnectingIdType</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">]::</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">SmtpAddress</span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">,</span></span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$MailboxToImpersonate</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> ); </span></span></span></p>
<p><span style="color:#008000;font-size:x-small;">#Connect to the Inbox and display basic statistics</span></p>
<p><span style="font-size:x-small;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$InboxFolder</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">=</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;">new-object</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#8a2be2;font-family:Lucida Console;"><span style="color:#8a2be2;font-family:Lucida Console;"><span style="color:#8a2be2;font-family:Lucida Console;">Microsoft.Exchange.WebServices.Data.FolderId</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">(</span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">[</span></span></span><span style="color:#008080;font-family:Lucida Console;"><span style="color:#008080;font-family:Lucida Console;"><span style="color:#008080;font-family:Lucida Console;">Microsoft.Exchange.WebServices.Data.WellKnownFolderName</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">]::</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">Inbox</span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">,</span></span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$ImpersonatedMailboxName</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">) </span></span></span></p>
<p><span style="font-size:x-small;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$Inbox</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">=</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">[</span></span></span><span style="color:#008080;font-family:Lucida Console;"><span style="color:#008080;font-family:Lucida Console;"><span style="color:#008080;font-family:Lucida Console;">Microsoft.Exchange.WebServices.Data.Folder</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">]::</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">Bind(</span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$service</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">,</span></span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$InboxFolder</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">)</span></span></span></p>
<p><span style="font-size:x-small;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;">Write-Host</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;"><span style="color:#8b0000;font-family:Lucida Console;"><span style="color:#8b0000;font-family:Lucida Console;">&#39;Total Item count for Inbox:&#39;</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$Inbox</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">.</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">TotalCount</span></span></span></p>
<p><span style="font-size:x-small;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;"><span style="color:#0000ff;font-family:Lucida Console;">Write-Host</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;"><span style="color:#8b0000;font-family:Lucida Console;"><span style="color:#8b0000;font-family:Lucida Console;">&#39;Total Items Unread:&#39;</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;"><span style="color:#ff4500;font-family:Lucida Console;">$Inbox</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;"><span style="color:#a9a9a9;font-family:Lucida Console;">.</span></span></span><span style="font-family:Lucida Console;"><span style="font-family:Lucida Console;">UnreadCount </span></span></span></p>
<p></p>
<p></p>
<p style="margin:0in 0in 0pt;"><span style="color:#1f497d;"><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></span></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Office 365 Reporting web service</title>
      <link>https://docs.microsoft.com/archive/blogs/circularlogging/office-365-reporting-web-service</link>
      <pubDate>Fri, 28 Mar 2014 10:42:00 GMT</pubDate>
      <dc:creator><![CDATA[Joel Ricketts - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/circularlogging/2014/03/28/office-365-reporting-web-service/</guid>
      <description><![CDATA[Some great new reporting features just released for Office...]]></description>
      <content:encoded><![CDATA[<p>Some great new reporting features just released for Office 365.<p></p><p><a href="https://msdn.microsoft.com/en-us/library/jj984325.aspx">https://msdn.microsoft.com/en-us/library/jj984325.aspx</a></p><p></p><p>A lot of these reports can be very useful in troubleshooting your environment. Especially the connection oriented ones for troubleshooting application connectivity into Office 365. Which is a big generator of support calls we see into Tier 3 support!</p><p></p><p>I will be adding some PowerShell snippets to this blog post soon...</p><p></p><p></p></p>
]]></content:encoded>
    </item>
    <item>
      <title>HTTPS Inspection incompatible with DIRSYNC tool for Office 365</title>
      <link>https://docs.microsoft.com/archive/blogs/circularlogging/https-inspection-incompatible-with-dirsync-tool-for-office-365</link>
      <pubDate>Thu, 26 Dec 2013 13:12:00 GMT</pubDate>
      <dc:creator><![CDATA[Joel Ricketts - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/circularlogging/2013/12/26/https-inspection-incompatible-with-dirsync-tool-for-office-365/</guid>
      <description><![CDATA[So for my first blog post, I thought I would talk about an issue I ran across while working to setup...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:Calibri;font-size:medium;">So for my first blog post, I thought I would talk about an issue I ran across while working to setup an on-premises Exchange 2010/2013 DIRSYNC to Office 365 through a forward proxy server. (In my case proxy was TMG 2010, but the same concepts should apply for third party forward proxy solutions.) We have a fairly typical layout that you would see in a majority of corporate environments. See High Level diagram below:</span></p>
<p><span style="font-family:Calibri;font-size:medium;"><span style="font-family:Calibri;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/8055.1.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/8055.1.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/8055.1.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/8055.1.jpg" border="0" /></a></span><br /></span></p>
<p></p>
<p><span style="font-family:Calibri;font-size:medium;">Once the DIRSYNC tool was installed (which is downloaded from your admin account for O365) I ran the configuration wizard to setup directory synchronization.</span></p>
<p><span style="font-family:Calibri;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/2.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/2.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/2.jpg" border="0" /></a></span></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><span style="font-size:medium;"><span style="font-family:Calibri;">After clicking the next button the tool failed, and&nbsp;give me a very informative error.&nbsp; :) </span></span></p>
<p><span style="font-size:medium;"><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/3.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/3.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/3.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/3.jpg" border="0" /></a></span><br /></span></span></p>
<p></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Calibri;font-size:medium;">So I took its advice and went and checked the Windows application log. Low and behold, the problem stuck out like a sore thumb. The forward proxy/TMG 2010 server, or as it&rsquo;s referred to in the description &ldquo;Remote Server&rdquo;, I was connecting through has HTTPS inspection turned on. I will talk a bit more later why this is an issue.</span></p>
<p><span style="font-family:Calibri;font-size:medium;"><span style="font-family:Calibri;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/4.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/4.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/4.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/4.jpg" border="0" /></a></span><br /></span></p>
<p></p>
<p><i><span style="font-family:Calibri;">Log Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Application</span></i></p>
<p><i><span style="font-family:Calibri;">Source:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Directory Synchronization</span></i></p>
<p><i><span style="font-family:Calibri;">Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12/20/2013 11:44:55 AM</span></i></p>
<p><i><span style="font-family:Calibri;">Event ID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</span></i></p>
<p><i><span style="font-family:Calibri;">Task Category: None</span></i></p>
<p><i><span style="font-family:Calibri;">Level:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Error</span></i></p>
<p><i><span style="font-family:Calibri;">Keywords:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Classic</span></i></p>
<p><i><span style="font-family:Calibri;">User:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; N/A</span></i></p>
<p><i><span style="font-family:Calibri;">Computer:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DIRSYNC.xxxxx-xxxxxxxx.com</span></i></p>
<p><i><span style="font-family:Calibri;">Description:</span></i></p>
<p><i><span style="font-family:Calibri;">The remote server returned an unexpected response: (502) Proxy Error ( The Web site requires a client certificate, but a client certificate cannot be supplied when HTTPS inspection is applied to the request.&nbsp;&nbsp; ).</span></i></p>
<p><i><span style="font-family:Calibri;">Event Xml:</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;Event xmlns=&quot;https://schemas.microsoft.com/win/2004/08/events/event&quot;&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;System&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;Provider Name=&quot;Directory Synchronization&quot; /&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;EventID Qualifiers=&quot;0&quot;&gt;0&lt;/EventID&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;Level&gt;2&lt;/Level&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;Task&gt;0&lt;/Task&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;Keywords&gt;0x80000000000000&lt;/Keywords&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;TimeCreated SystemTime=&quot;2013-12-20T17:44:55.000000000Z&quot; /&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;EventRecordID&gt;1248&lt;/EventRecordID&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;Channel&gt;Application&lt;/Channel&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;Computer&gt;DIRSYNC.xxxxx-xxxxxxxx.com&lt;/Computer&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;Security /&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;/System&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;EventData&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;Data&gt;The remote server returned an unexpected response: (502) Proxy Error ( The Web site requires a client certificate, but a client certificate cannot be supplied when HTTPS inspection is applied to the request.&nbsp;&nbsp; ).&lt;/Data&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;/EventData&gt;</span></i></p>
<p><i><span style="font-family:Calibri;">&lt;/Event&gt;</span></i></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Calibri;font-size:medium;">Below you can also see the error in the TMG log as well</span></p>
<p><span style="color:#ff0000;"><b><span style="font-family:Calibri;"><span style="font-size:large;">Denied Connection</span> </span></b></span></p>
<p><span style="font-family:Calibri;"><b><i>12/20/2013 11:44:55 AM</i></b><i> </i></span></p>
<p><span style="font-family:Calibri;"><b><i>Log type: </i></b><i>Web Proxy (Forward)</i></span></p>
<p><span style="font-family:Calibri;"><b><i>Status: </i></b><i>12229 The Web site requires a client certificate, but a client certificate cannot be supplied when HTTPS inspection is applied to the request.</i></span></p>
<p><span style="font-family:Calibri;"><b><i>Rule: </i></b><i>Anonymouse Access To Web <b>Source: </b>Internal (10.10.10.9:51269) </i></span></p>
<p><span style="font-family:Calibri;"><b><i>Destination: </i></b><i>External (157.56.55.72:443) </i></span></p>
<p><span style="font-family:Calibri;"><b><i>Request: </i></b><i>POST adminwebservice.microsoftonline.com </i></span></p>
<p><span style="font-family:Calibri;"><b><i>Filter information: </i></b><i>Req ID: 0a18f9a4; Compression: client=No, server=Yes, compress rate=0% decompress rate=0% </i></span></p>
<p><span style="font-family:Calibri;"><b><i>Protocol: </i></b><i>https-inspect </i></span></p>
<p><span style="font-family:Calibri;"><b><i>User: </i></b><i>anonymous </i></span></p>
<p><span style="font-family:Calibri;"><b><i>Object source: </i></b><i>Internet (Source is the Internet. Object was added to the cache.) </i></span></p>
<p><span style="font-family:Calibri;"><b><i>Cache info: </i></b><i>0x0 </i></span></p>
<p><span style="font-family:Calibri;"><b><i>Processing time: </i></b><i>63<b> MIME type: </b>-</i></span></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Calibri;font-size:medium;">This is more like it. As you can see the error clearly states this is a proxy configuration issue, and HTTPS inspection needs to be turned off. HTTPS inspection is not compatible with servers that require a client certificate. So be armed with this error (and this blog post) when you go request that your proxy admin remove HTTPS inspection.</span></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><b><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">Removing HTTPS inspection on TMG 2010</span></span></b></p>
<p><span style="font-family:Calibri;"><span style="font-size:medium;">So while this talks specifically about TMG, most 3</span><sup><span style="font-size:small;">rd</span></sup><span style="font-size:medium;"> party proxy solutions will allow you to make HTTPS inspection exceptions.</span></span></p>
<ul>
<li>
<p>Log into TMG and open the management console and click &quot;configure HTTPS&quot; inspection&quot; in the right pane.</p>
<p><span style="font-family:Calibri;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/5.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/5.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/5.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/5.jpg" border="0" /></a></span></p>
<p></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</li>
<li>
<p>You have two ways to tackle this, by source host or by destination address. I chose by source exceptions because my many years of supporting Exchange and TMG have emphasized the clich&eacute; of an &ldquo;ounce of prevention is worth a pound of cure.&rdquo; Keep in mind either method will work, but if you choose or your company&rsquo;s policy is to make exceptions by remote domain, should any of those remote domain names change in the future (which is outside of your control) your DIRSYNC may break if you do not actively go in once you get notice said change may occur and update your remote exceptions.</p>
<p><span style="font-family:Calibri;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/6.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/6.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/6.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/6.jpg" border="0" /></a></span></p>
<p>&nbsp;</p>
</li>
<li>
<p>Add your source host in the list. Click &ldquo;Ok&rdquo; and then click the &ldquo;Apply&rdquo; button to commit the change to the TMG configuration database.</p>
<p><span style="font-family:Calibri;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/7.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/7.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/7.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/7.jpg" border="0" /></a></span></p>
<p>&nbsp;</p>
</li>
<li>
<p>One more thing before you swing back to your DIRSYNC server is to check to make sure the TMG CSS has been updated. Select the monitoring in the left pane, and then select configuration. Make sure the status is &ldquo;Synced&rdquo; and the description is &ldquo;Server configuration matches the stored configuration.&rdquo; If you have an array make sure all array members have sync&rsquo;d with the CSS.</p>
<p><span style="font-family:Calibri;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/8.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/8.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/8.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/8.jpg" border="0" /></a></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</li>
<li>
<p>Now jump back to your DIRSYNC server, re-run the wizard and bam! It works!!</p>
<p><span style="font-family:Calibri;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/9.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/9.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/9.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/9.jpg" border="0" /></a></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><b>So why does HTTPS inspection on a Forward Proxy not allow the DIRSYNC tool to work?</b></p>
<p><b>&nbsp;</b></p>
<p>Long story short here, the certificate on the remote web server you are (DIRSYNC tool in this case) connecting to states &ldquo;Client Authentication (1.3.6.1.5.5.7.3.2)&rdquo; &nbsp;&nbsp;in the Enhanced Key Usage field of its certificate. So HTTPS inspection breaks this because of the way it works.</p>
<p><span style="font-family:Calibri;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/10.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/10.JPG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/10.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/10.JPG" border="0" /></a></span></p>
<p></p>
<p>In order for TMG to inspect the clients HTTPS request it must be able to decrypt it. So in order to do this TMG establishes a new HTTPS connection between itself and the client using a certificate signed by its own CA. (See picture below). Once this happens it is then able to read the contents of the clients request and apply filtering rules based on the policy setup by proxy administrator. If TMG determines everything looks good it will then establish a second HTTPS session with the remote web server which will allow it to inspect the return traffic. Because the remote web server requires client authentication to prove the identity of the client the web server is talking with TMG will not continue the SSL session. Therefore disabling HTTP inspection creates an SSL tunnel directly between the Server and client allowing the two way authentication and establishing a highly secure link between the two systems&nbsp;to synchronize your directory with your Azure/O365 directory.</p>
<p><span style="font-family:Calibri;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/11.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/11.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/38/11.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-38/11.jpg" border="0" /></a></span></p>
<p></p>
</li>
</ul>
<p><b><span style="font-family:Calibri;font-size:medium;">Further Reading</span></b></p>
<p><a href="https://www.ietf.org/rfc/rfc2459.txt"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">RFC 2459</span></a></p>
<p><a href="https://social.technet.microsoft.com/wiki/contents/articles/987.windows-pki-documentation-reference-and-library.aspx"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">Windows PKI Documentation Reference and Library</span></a></p>
<p><a href="https://technet.microsoft.com/en-us/library/ee658156.aspx"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">Planning for HTTPS inspection</span></a></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p></p>]]></content:encoded>
    </item>
  </channel>
</rss>