<div> 
<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2529 " id="quads-ad2529" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>
 <h2>Error code</h2><p>Yesterday my colleague sent me a message informing me that ADFS is not working. When I tried to login to Office 365 Portal page with a federated domain&rsquo;s user I got a 500 Internal Server Error.</p><div> 
<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2531 " id="quads-ad2531" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>
 </div><div> 
<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2523 " id="quads-ad2523" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>
 </div><div> 
<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2530 " id="quads-ad2530" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>
 </div><h2>When it occurs:</h2><p>If you are using Office 365 with ADFS Integration in place, You might get this error when trying to authenticate your users to login to Office 365 or any of its services.</p><p><a href="https://www.moh10ly.com/wp-content/uploads/2020/04/image-10.png"><img style="margin: 0px; display: inline; background-image: none;" title="image" src="https://www.moh10ly.com/wp-content/uploads/2020/04/image_thumb-10.png" alt="image" width="746" height="160" border="0"></a> 
</p><div> 
<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2528 " id="quads-ad2528" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>
 </div><h2>WAP Server</h2><p>In this environment I am using WAP Proxy server behind ADFS and when installing this I configured a trust using a Public Certificate but for some reason this trust was broken.</p><p><a href="https://www.moh10ly.com/wp-content/uploads/2020/04/image-11.png"><img style="display: inline; background-image: none;" title="image" src="https://www.moh10ly.com/wp-content/uploads/2020/04/image_thumb-11.png" alt="image" width="1028" height="328" border="0"></a></p><h2></h2><h2>Investigation and Solution:</h2><p>After investigating the WAP proxy it seems it had couple of problems:</p><h4>1- Could not resolve ADFS server name on WAP Server.</h4><ul>
<li>In my environment where we are using Sentinel, We have isolated the primary DC in the environment and due to this the WAP server could not reach to the DNS Server. I solved this by pointing the machine to the secondary DC and add the ADFS hostname to the host file.</li>
</ul><h4>2- The Web Application Proxy Service would not start.</h4><ul>
<li>The errors related to the service not starting in the event viewer were all pointing to a certificate thumbprint which didn&rsquo;t even exist in the WAP&rsquo;s personal store.</li>
</ul><h3>Event Viewer Errors</h3><p>There were couple of errors related to the certificate and Service issue, Event ID 224, Event ID 12025, Event ID 7023 and Event ID 224.</p><p>The one which mostly got my attention was the 224:</p><p><strong>The federation server proxy configuration could not be updated with the latest configuration on the federation service.</strong></p><p><strong>Retrieval of proxy config data from federation server using trust certificate with thumbprint failed with status code unauthorized. The remote server returned an error code 401.</strong></p><p><a href="https://www.moh10ly.com/wp-content/uploads/2020/04/clip_image001.png"><img style="margin: 0px; display: inline; background-image: none;" title="clip_image001" src="https://www.moh10ly.com/wp-content/uploads/2020/04/clip_image001_thumb.png" alt="clip_image001" width="1028" height="653" border="0"></a></p><h2>Resolution:</h2><p>From WAP server&rsquo;s fire up PowerShell as an admin and list the certificate you have got on your Personal store and match the ThumbPrints of the certificate in the error to make sure it exists or not.</p><p>Even if the certificate exists you will still need to re-establish trust with ADFS to make sure WAP can connect to ADFS without an issue.</p><blockquote><p>Dir Cert:\localmachine\my</p></blockquote><p>This should show the certificates you have got on your store.</p><p><a href="https://www.moh10ly.com/wp-content/uploads/2020/04/image-12.png"><img style="margin: 0px; display: inline; background-image: none;" title="image" src="https://www.moh10ly.com/wp-content/uploads/2020/04/image_thumb-12.png" alt="image" width="868" height="528" border="0"></a></p><p>Now pick up the valid Public certificate which you want to use for the trust and use the below command to establish the trust</p><blockquote><p>Install-WebApplicationProxy &ndash;CertificateThumbprint &ldquo;Enter Certificate ThumbPrint here&rdquo; &ndash;FederationServiceName &ldquo;ADFS Public FQDN Here&rdquo;</p></blockquote><p><a href="https://www.moh10ly.com/wp-content/uploads/2020/04/image-13.png"><img style="margin: 0px; display: inline; background-image: none;" title="image" src="https://www.moh10ly.com/wp-content/uploads/2020/04/image_thumb-13.png" alt="image" width="858" height="400" border="0"></a></p><p>After few moments you should see that WAP services went back to normal and you can now login your users to Office 365 portal through ADFS.</p><p><a href="https://www.moh10ly.com/wp-content/uploads/2020/04/image-14.png"><img style="margin: 0px; display: inline; background-image: none;" title="image" src="https://www.moh10ly.com/wp-content/uploads/2020/04/image_thumb-14.png" alt="image" width="1028" height="221" border="0"></a></p><div> 
<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2524 " id="quads-ad2524" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>
 </div><p><a href="https://www.moh10ly.com/wp-content/uploads/2020/04/clip_image0016.png"><img style="margin: 0px; display: inline; background-image: none;" title="clip_image001[6]" src="https://www.moh10ly.com/wp-content/uploads/2020/04/clip_image0016_thumb.png" alt="clip_image001[6]" width="1028" height="319" border="0"></a></p></div>

<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2522 " id="quads-ad2522" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>


Reset and manage your Active Directory users' Passwords Active Directory is one of the most…
Finding Exchange Database hidden mailboxes. Story:Maybe you have been in this situation before, trying to…
If you're using a Proxy server in your firewall or in your network and have…
Story:I got some clients that have reported some of their users being locked out and…
Delegate Permissions This is a code that I have wrote recently to check if an…
Story: I got a request from a client who constantly gets CVs and have to…