{"id":434,"date":"2017-01-18T22:44:12","date_gmt":"2017-01-19T03:44:12","guid":{"rendered":"https:\/\/www.ccrossan.com\/blog\/?p=434"},"modified":"2019-07-18T08:38:51","modified_gmt":"2019-07-18T12:38:51","slug":"adfs-4-0-server-2016-outlook-web-app-2013","status":"publish","type":"post","link":"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/","title":{"rendered":"ADFS 4.0 on Server 2016 <-> Outlook Web App 2013"},"content":{"rendered":"\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=crossan007\" class=\"twitter-share-button\">Tweet<\/a><\/div>\n<p>I recently enabled SAML authentication on Outlook Web App 2013, following the TechNet Documentation here: <a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/dn635116(v=exchg.150).aspx\">https:\/\/technet.microsoft.com\/en-us\/library\/dn635116(v=exchg.150).aspx<\/a><\/p>\n<p>It seemed to work fine; however, I would occasionally (about 1\/8 attempts) receive an error message saying: \u201cWrongAudienceUriOrBadSigningCert\u201d<\/p>\n<p>I had already added my ADFS token signing certificate to the Exchange server&#8217;s trusted root store as\u00a0 suggested here:\u00a0 <a href=\"https:\/\/flamingkeys.com\/exchange-2013-with-ad-fs-login-fails-with-wrongaudienceuriorbadsigningcert\/\">https:\/\/flamingkeys.com\/exchange-2013-with-ad-fs-login-fails-with-wrongaudienceuriorbadsigningcert\/<\/a><\/p>\n<p>The truly troubling thing was, that the issue could not be reproduced reliably.\u00a0 It affected both internal and external devices (both the primary ADFS and the ADFS Web Application Proxy servers)<\/p>\n<p>I watched a fiddler trace as I attempted to access OWA, and the only difference between successful and failed attempts was a\u00a0 &#8220;\/&#8221; at the end of the URL.<\/p>\n<p>This can be observed in the POST body of the 302 to owa:<\/p>\n<p id=\"SiNMoeq\"><img loading=\"lazy\" class=\"alignnone wp-image-435 size-full\" src=\"https:\/\/crossan007.dev\/blog\/wp-content\/uploads\/2017\/01\/img_588033e757ce9-e1563453511619.png\" alt=\"\" width=\"458\" height=\"92\" srcset=\"https:\/\/crossan007.dev\/blog\/wp-content\/uploads\/2017\/01\/img_588033e757ce9-e1563453511619.png 458w, https:\/\/crossan007.dev\/blog\/wp-content\/uploads\/2017\/01\/img_588033e757ce9-e1563453511619-300x60.png 300w\" sizes=\"(max-width: 458px) 100vw, 458px\" \/><\/p>\n<pre><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\n&amp;amp;amp;lt;saml:AudienceRestrictionCondition&amp;amp;amp;gt;\n&amp;amp;amp;lt;saml:Audience&amp;amp;amp;gt;https:\/\/mail.corp.org\/owa\/&amp;amp;amp;lt;\/saml:Audience&amp;amp;amp;gt;\n&amp;amp;amp;lt;\/saml:AudienceRestrictionCondition&amp;amp;amp;gt;\n\n<\/pre>\n<pre><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;amp;amp;lt;saml:AudienceRestrictionCondition&amp;amp;amp;gt;\n&amp;amp;amp;lt;saml:Audience&amp;amp;amp;gt;https:\/\/mail.corp.org\/owa&amp;amp;amp;lt;\/saml:Audience&amp;amp;amp;gt;\n&amp;amp;amp;lt;\/saml:AudienceRestrictionCondition&amp;amp;amp;gt;\n<\/pre>\n<p>This is the token issued to me by my ADFS4 Server!\u00a0 It would seem that the tokens issued by the IdP do not contain a consistent Audience tag.<\/p>\n<p>The TechNet documentation states very clearly that<\/p>\n<blockquote><p>The inclusion of the trailing slash <strong>\/<\/strong> in the URL examples shown below is intentional. It&#8217;s important to ensure that both the AD FS relying party trusts and Exchange Audience URI\u2019s <strong>are identical<\/strong>. This means the AD FS relying party trusts and Exchange Audience URI&#8217;s should <strong>both have<\/strong> or <strong>both emit<\/strong> the trailing slashes in their URLs. The examples in this section contain the trailing <strong>\/<\/strong>\u2019s after any url ending with &#8220;owa&#8221; ( \/owa\/) or &#8220;ecp&#8221; (\/ecp\/).<\/p><\/blockquote>\n<p>Ignoring this advise, I added <em>all 4 urls<\/em> to my Exchange farm configuration<\/p>\n<pre><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\n$uris = @(&quot;https:\/\/mail.corp.org\/owa\/&quot;,&quot;https:\/\/mail.corp.org\/ecp\/&quot;,&quot;https:\/\/mail.corp.org\/owa&quot;,&quot;https:\/\/mail.corp.org\/ecp&quot;)\n\nSet-OrganizationConfig -AdfsIssuer &quot;https:\/\/adfs.corp.org\/adfs\/ls\/&quot; -AdfsAudienceUris $uris -AdfsSignCertificateThumbprint &quot;&amp;amp;amp;lt;thhumb&amp;amp;amp;gt;&quot;\n\n<\/pre>\n<p>Having 4 audience URIs resulted in a 100% success rate while attempting to open OWA from a successful ADFS authentication.<\/p>\n<p>I hope this helps someone, as I couldn&#8217;t seem to find this issue anywhere else online.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently enabled SAML authentication on Outlook Web App 2013, following the TechNet Documentation here: https:\/\/technet.microsoft.com\/en-us\/library\/dn635116(v=exchg.150).aspx It seemed to work fine; however, I would occasionally (about 1\/8 attempts) receive an error message saying: \u201cWrongAudienceUriOrBadSigningCert\u201d I had already added my ADFS token signing certificate to the Exchange server&#8217;s trusted root store as\u00a0 suggested here:\u00a0 https:\/\/flamingkeys.com\/exchange-2013-with-ad-fs-login-fails-with-wrongaudienceuriorbadsigningcert\/ The &hellip; <a href=\"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">ADFS 4.0 on Server 2016 <-> Outlook Web App 2013<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[28],"tags":[191,30,194,192,193],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ADFS 4.0 on Server 2016  Outlook Web App 2013 - Charles&#039; Blog\" \/>\n<meta property=\"og:description\" content=\"I recently enabled SAML authentication on Outlook Web App 2013, following the TechNet Documentation here: https:\/\/technet.microsoft.com\/en-us\/library\/dn635116(v=exchg.150).aspx It seemed to work fine; however, I would occasionally (about 1\/8 attempts) receive an error message saying: \u201cWrongAudienceUriOrBadSigningCert\u201d I had already added my ADFS token signing certificate to the Exchange server&#8217;s trusted root store as\u00a0 suggested here:\u00a0 https:\/\/flamingkeys.com\/exchange-2013-with-ad-fs-login-fails-with-wrongaudienceuriorbadsigningcert\/ The &hellip; Continue reading ADFS 4.0 on Server 2016 Outlook Web App 2013 &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/\" \/>\n<meta property=\"og:site_name\" content=\"Charles&#039; Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-19T03:44:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-07-18T12:38:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crossan007.dev\/blog\/wp-content\/uploads\/2017\/01\/img_588033e757ce9-e1563453511619.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"crossan007\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/crossan007.dev\/blog\/#website\",\"url\":\"https:\/\/crossan007.dev\/blog\/\",\"name\":\"Charles&#039; Blog\",\"description\":\"SharePoint | PowerShell | Exchange | SCCM | Ubuntu | PHP | JavaScript | A\/V Live Production | More...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/crossan007.dev\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/crossan007.dev\/blog\/wp-content\/uploads\/2017\/01\/img_588033e757ce9-e1563453511619.png\",\"contentUrl\":\"https:\/\/crossan007.dev\/blog\/wp-content\/uploads\/2017\/01\/img_588033e757ce9-e1563453511619.png\",\"width\":458,\"height\":92},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/#webpage\",\"url\":\"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/\",\"name\":\"ADFS 4.0 on Server 2016 Outlook Web App 2013 - Charles&#039; Blog\",\"isPartOf\":{\"@id\":\"https:\/\/crossan007.dev\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/#primaryimage\"},\"datePublished\":\"2017-01-19T03:44:12+00:00\",\"dateModified\":\"2019-07-18T12:38:51+00:00\",\"author\":{\"@id\":\"https:\/\/crossan007.dev\/blog\/#\/schema\/person\/bd99569cd81332c8fd866d023848b979\"},\"breadcrumb\":{\"@id\":\"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/crossan007.dev\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ADFS 4.0 on Server 2016 Outlook Web App 2013\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/crossan007.dev\/blog\/#\/schema\/person\/bd99569cd81332c8fd866d023848b979\",\"name\":\"crossan007\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/crossan007.dev\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fff72c74fb6a0da29accf0db83ad4b4b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fff72c74fb6a0da29accf0db83ad4b4b?s=96&d=mm&r=g\",\"caption\":\"crossan007\"},\"url\":\"https:\/\/crossan007.dev\/blog\/author\/crossan007\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/","og_locale":"en_US","og_type":"article","og_title":"ADFS 4.0 on Server 2016  Outlook Web App 2013 - Charles&#039; Blog","og_description":"I recently enabled SAML authentication on Outlook Web App 2013, following the TechNet Documentation here: https:\/\/technet.microsoft.com\/en-us\/library\/dn635116(v=exchg.150).aspx It seemed to work fine; however, I would occasionally (about 1\/8 attempts) receive an error message saying: \u201cWrongAudienceUriOrBadSigningCert\u201d I had already added my ADFS token signing certificate to the Exchange server&#8217;s trusted root store as\u00a0 suggested here:\u00a0 https:\/\/flamingkeys.com\/exchange-2013-with-ad-fs-login-fails-with-wrongaudienceuriorbadsigningcert\/ The &hellip; Continue reading ADFS 4.0 on Server 2016 Outlook Web App 2013 &rarr;","og_url":"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/","og_site_name":"Charles&#039; Blog","article_published_time":"2017-01-19T03:44:12+00:00","article_modified_time":"2019-07-18T12:38:51+00:00","og_image":[{"url":"https:\/\/crossan007.dev\/blog\/wp-content\/uploads\/2017\/01\/img_588033e757ce9-e1563453511619.png"}],"twitter_misc":{"Written by":"crossan007","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/crossan007.dev\/blog\/#website","url":"https:\/\/crossan007.dev\/blog\/","name":"Charles&#039; Blog","description":"SharePoint | PowerShell | Exchange | SCCM | Ubuntu | PHP | JavaScript | A\/V Live Production | More...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/crossan007.dev\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/#primaryimage","inLanguage":"en-US","url":"https:\/\/crossan007.dev\/blog\/wp-content\/uploads\/2017\/01\/img_588033e757ce9-e1563453511619.png","contentUrl":"https:\/\/crossan007.dev\/blog\/wp-content\/uploads\/2017\/01\/img_588033e757ce9-e1563453511619.png","width":458,"height":92},{"@type":"WebPage","@id":"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/#webpage","url":"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/","name":"ADFS 4.0 on Server 2016 Outlook Web App 2013 - Charles&#039; Blog","isPartOf":{"@id":"https:\/\/crossan007.dev\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/#primaryimage"},"datePublished":"2017-01-19T03:44:12+00:00","dateModified":"2019-07-18T12:38:51+00:00","author":{"@id":"https:\/\/crossan007.dev\/blog\/#\/schema\/person\/bd99569cd81332c8fd866d023848b979"},"breadcrumb":{"@id":"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crossan007.dev\/blog\/microsoft-exchange\/adfs-4-0-server-2016-outlook-web-app-2013\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/crossan007.dev\/blog\/"},{"@type":"ListItem","position":2,"name":"ADFS 4.0 on Server 2016 Outlook Web App 2013"}]},{"@type":"Person","@id":"https:\/\/crossan007.dev\/blog\/#\/schema\/person\/bd99569cd81332c8fd866d023848b979","name":"crossan007","image":{"@type":"ImageObject","@id":"https:\/\/crossan007.dev\/blog\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/fff72c74fb6a0da29accf0db83ad4b4b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fff72c74fb6a0da29accf0db83ad4b4b?s=96&d=mm&r=g","caption":"crossan007"},"url":"https:\/\/crossan007.dev\/blog\/author\/crossan007\/"}]}},"_links":{"self":[{"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/posts\/434"}],"collection":[{"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/comments?post=434"}],"version-history":[{"count":10,"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/posts\/434\/revisions"}],"predecessor-version":[{"id":655,"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/posts\/434\/revisions\/655"}],"wp:attachment":[{"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/media?parent=434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/categories?post=434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/tags?post=434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}