{"id":2213,"date":"2022-04-02T01:22:52","date_gmt":"2022-04-01T23:22:52","guid":{"rendered":"https:\/\/itsimple.info\/?p=2213"},"modified":"2022-04-02T01:22:54","modified_gmt":"2022-04-01T23:22:54","slug":"exchange-owa-and-ecp-not-working-and-you-get-error-about-exchange-server-oauth-certificate-is-expired","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=2213","title":{"rendered":"Exchange OWA and ECP not working and you get error about Exchange Server OAuth certificate is expired"},"content":{"rendered":"\n<p>When trying to log in on Exchange OWA or ECP you get error about not functioning and you might see this error :  \u201cHMACProvider.GetCertificates:protectionCertificates.Length&lt;1\u201d:<\/p>\n\n\n\n<p>&nbsp;Event 1003 is logged in the event viewer. For example, the following entry is logged:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Event ID: 1003<br>Source: MSExchange Front End HTTPS Proxy<br>[Owa] An internal server error occurred. The unhandled exception was: System.NullReferenceException: Object reference not set to an instance of an object.<br>at Microsoft.Exchange.HttpProxy.FbaModule.ParseCadataCookies(HttpApplication httpApplication)<\/p><\/blockquote>\n\n\n\n<p>This issue occurs if the Exchange Server Open Authentication (OAuth) certificate is expired, not present, or not configured correctly. The Sulotion is to create new OAuth certificate, here s the steps :<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>check the status of the current certificate<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">(Get-AuthConfig).CurrentCertificateThumbprint | Get-ExchangeCertificate | Format-List<\/pre>\n\n\n\n<p>2. Create a new OAuth certificate by running the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">New-ExchangeCertificate -KeySize 2048 -PrivateKeyExportable $true -SubjectName \"cn=Microsoft Exchange Server Auth Certificate\" -FriendlyName \"Microsoft Exchange Server Auth Certificate\" -DomainName @()<\/pre>\n\n\n\n<p>3. Set the new certificate for server authentication. To do this, run the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Set-AuthConfig -NewCertificateThumbprint &lt;ThumbprintFromStep1> -NewCertificateEffectiveDate (Get-Date)\nSet-AuthConfig -PublishCertificate\nSet-AuthConfig -ClearPreviousCertificate\n<\/pre>\n\n\n\n<p>4. Either run the\u00a0<code>IISReset<\/code>\u00a0command to restart IIS or run the following commands (in elevated mode) to recycle the Outlook on the web and EAC application pools:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">IIRESET    or\nRestart-WebAppPool MSExchangeOWAAppPool\nRestart-WebAppPool MSExchangeECPAppPool<\/pre>\n\n\n\n<p>5. If you have more the one exchange server, you must execute the IIS restart on all of them:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Get-ExchangeServer | invoke-command -scriptblock {iisreset}<\/pre>\n\n\n\n<p>Now you have to wait patiently for few hours (1 to 5) until all the server will replicate with the certificate and the new configured setting<\/p>\n\n\n\n<figure class=\"wp-block-pullquote has-vivid-green-cyan-color has-text-color has-medium-font-size\" style=\"font-style:normal;font-weight:700\"><blockquote><p>Good Luck<\/p><\/blockquote><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>When trying to log in on Exchange OWA or ECP you get error about not functioning and you might see this error : \u201cHMACProvider.GetCertificates:protectionCertificates.Length&lt;1\u201d: &nbsp;Event 1003 is logged in the event viewer. For example, the following entry is logged: Event ID: 1003Source: MSExchange Front End HTTPS Proxy[Owa] An internal server error occurred. The unhandled exception [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,8,9,12,14,15],"tags":[],"class_list":["post-2213","post","type-post","status-publish","format-standard","hentry","category-microsoft-exchange-2010","category-microsoft-exchange-2013","category-microsoft-exchange-2016","category-tutorials","category-windows","category-windows-server"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/2213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2213"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/2213\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}