{"id":7893,"date":"2026-05-12T16:50:48","date_gmt":"2026-05-12T14:50:48","guid":{"rendered":"https:\/\/blog.redbaronofazure.com\/?p=7893"},"modified":"2026-05-13T08:55:58","modified_gmt":"2026-05-13T06:55:58","slug":"saml-federation-with-entra-again","status":"publish","type":"post","link":"https:\/\/blog.redbaronofazure.com\/?p=7893","title":{"rendered":"SAML Federation with Entra (again)"},"content":{"rendered":"\n<p>Much water has passed under the bridge since I last had to work with SAML federation. It was with Azure AD B2C and with the sample test app <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/azure-ad-b2c\/saml-sp\" data-type=\"URL\" data-id=\"https:\/\/github.com\/azure-ad-b2c\/saml-sp\" target=\"_blank\">azure-ad-b2c\/saml-sp<\/a>. Now, I needed this app to test SAML SP initiated SSO with Entra ID, so I set about to modify the app which resulted in this new repo <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/cljung\/samltestapp\" target=\"_blank\">https:\/\/github.com\/cljung\/samltestapp<\/a>.  <\/p>\n\n\n\n<p>The key differences are:<\/p>\n\n\n\n<ol><li>All B2C related functions are removed<\/li><li>Simplified configuration by just specifying the SAML metadata URL from Entra <\/li><li>SAML Requests &amp; Responses for sign-in and logout are made viewable to help understanding what is going on.<\/li><\/ol>\n\n\n\n<p>You have a deployed instance available here that you canplay with <a rel=\"noreferrer noopener\" href=\"https:\/\/samltestapp.azurewebsites.net\/\" target=\"_blank\">https:\/\/samltestapp.azurewebsites.net\/<\/a>. <\/p>\n\n\n\n<h2>SP initiated SSO<\/h2>\n\n\n\n<p>To test-drive SAML SP initiated SSO for your SAML enabled Entra application, select <em>Service Provider<\/em> in the top menu. Then paste in the App Federation Metadata URL. The Issuer is prefilled and shouldn&#8217;t have to be changed unless you have built your own version where you have changed your config file. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"389\" src=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-12-162629-1024x389.png\" alt=\"\" class=\"wp-image-7894\" srcset=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-12-162629-1024x389.png 1024w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-12-162629-300x114.png 300w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-12-162629-768x292.png 768w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-12-162629-1536x584.png 1536w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-12-162629.png 1618w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Pressing the <em>Login<\/em> button will take you through the normal Entra sign-in flow, with MFA or whatever your Entra tenant is configured with, then return to the test app to display the claims Entra returns in the SAML Response. You can inspect the SAML Request message the app sent to Entra and the SAML Response message Entra sent back via clicking on the links in highlighted red rectangle. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"609\" src=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-12-162707-1024x609.png\" alt=\"\" class=\"wp-image-7895\" srcset=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-12-162707-1024x609.png 1024w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-12-162707-300x179.png 300w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-12-162707-768x457.png 768w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-12-162707.png 1477w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2>Configuring SAML Test App in your Entra tenant<\/h2>\n\n\n\n<p>Configuring the SAML Test App in your Entra tenant is very simple. You only have to follow these steps:<\/p>\n\n\n\n<ol><li>Sign in to the Entra Admin portal<\/li><li>Goto Entra ID &gt; Enterprise apps &gt; +New application &gt; +Create your own application<\/li><li>Enter a name, like&nbsp;<em>SAMLTestApp<\/em>&nbsp;and select&nbsp;<em>Integrate any other application<\/em><\/li><li>Select Single sign-on and then SAML<\/li><li>Enter &#8216;748f981c36434853ae702032edae49e0&#8217; for the&nbsp;<em>Identifier (Entity ID)<\/em><\/li><li>Enter &#8216;https:\/\/samltestapp.azurewebsites.net\/SP\/AssertionConsumer&#8217; for the&nbsp;<em>Reply URL (Assertion Consumer Service URL)<\/em><\/li><li>Enter &#8216;https:\/\/samltestapp.azurewebsites.net\/Logout&#8217; for the&nbsp;<em>Logout URL (Optional)<\/em><\/li><li>Click Save<\/li><\/ol>\n\n\n\n<p>To test:<\/p>\n\n\n\n<ol><li>Scroll down and copy the&nbsp;<em>App Federation Metadata Url<\/em>&nbsp;link<\/li><li>Open&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/samltestapp.azurewebsites.net\/SP\/\" target=\"_blank\">https:\/\/samltestapp.azurewebsites.net\/SP\/<\/a>&nbsp;in the browser<\/li><li>Paste in the metadata URL<\/li><li>Click Login<\/li><\/ol>\n\n\n\n<p>As you can see in the above screenshot, I modified what claims Entra sends back for the user to add group memberships. This is done under <em>Attributes &amp; Claims<\/em> and <em>+Add group claim<\/em>. The test app will display any claims Entra sends in the response.<\/p>\n\n\n\n<h2>IDP Initiated SSO<\/h2>\n\n\n\n<p>Testing IDP Initiated SSO is very easy. You just add your test account to your Enterprise app in the <em>users and groups<\/em> section in the Entra Admin portal. That will make it appear in <a rel=\"noreferrer noopener\" href=\"https:\/\/myapps.microsoft.com\" target=\"_blank\">https:\/\/myapps.microsoft.com<\/a> for the test user. Clicking on the SAMLTestApp tile in MyApps will trigger an IDP Initiated SSO sign-in and you will land in the <em>SAML Login Success<\/em> page in the test app with claims for the test user. There will only be a <em>Show SAML Response<\/em> link as there was never a SAML sign-in request sent to Entra. This also highlights the difference between SP and IDP Initiated SSO.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"364\" src=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-13-082623-1024x364.png\" alt=\"\" class=\"wp-image-7901\" srcset=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-13-082623-1024x364.png 1024w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-13-082623-300x107.png 300w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-13-082623-768x273.png 768w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-13-082623-1536x546.png 1536w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2026\/05\/Screenshot-2026-05-13-082623.png 1575w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2>Summary<\/h2>\n\n\n\n<p>SAML Test App is a simple tool to test-drive your Entra SAML SP initiated SSO. If your real app isn&#8217;t behaving as expected, you can replicate the configuration, with attributes, claims, etc, to the SAML Test App and see what is being returned from Entra. When you are happy with the configuration, you can then apply it back to your real app.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Much water has passed under the bridge since I last had to work with SAML federation. It was with Azure AD B2C and with the sample test app azure-ad-b2c\/saml-sp. Now, I needed this app to test SAML SP initiated SSO with Entra ID, so I set about to modify the app which resulted in this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[453,456],"tags":[447],"_links":{"self":[{"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=\/wp\/v2\/posts\/7893"}],"collection":[{"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7893"}],"version-history":[{"count":5,"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=\/wp\/v2\/posts\/7893\/revisions"}],"predecessor-version":[{"id":7903,"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=\/wp\/v2\/posts\/7893\/revisions\/7903"}],"wp:attachment":[{"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}