{"id":2188,"date":"2018-07-11T08:00:10","date_gmt":"2018-07-11T06:00:10","guid":{"rendered":"https:\/\/msb365.abstergo.ch\/?p=2188"},"modified":"2023-06-23T13:19:54","modified_gmt":"2023-06-23T11:19:54","slug":"azure-active-directory-pass-through-authentication","status":"publish","type":"post","link":"https:\/\/www.msb365.blog\/?p=2188","title":{"rendered":"Azure Active Directory Pass-through Authentication"},"content":{"rendered":"<p>As far we know until today, the best solution form the Microsoft point of view is, to use ADFS to authenticate on-premises users for cloud services such as Azure or Office 365. This is working very well and there are many articles about how to configure the clams etc. can be found in internet and also on <a href=\"https:\/\/msb365.abstergo.ch\/?cat=4\" target=\"_blank\" rel=\"noopener\">my Blog<\/a>.<\/p>\n<p>However, if a company don\u2019t want to use ADFS for authentication, there is another way Microsoft supports, but it is not so common like the ADFS solution. In this article I want to present an alternative way using AAD with Pass-through.<\/p>\n<p>\u00a0<\/p>\n<h2>How does that works?<\/h2>\n<p>To show the whole authentication progress, we are going to use the picture below. The progress is divided in 11 steps:<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-2208\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/1-3.png\" alt=\"\" width=\"1826\" height=\"1320\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/1-3.png 1826w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/1-3-300x217.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/1-3-768x555.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/1-3-1024x740.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/1-3-600x434.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/1-3-1600x1157.png 1600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/1-3-780x564.png 780w\" sizes=\"(max-width: 1826px) 100vw, 1826px\" \/><\/p>\n<p>When a user tries to sign into an application secured by Azure AD, and if Pass-through Authentication is enabled on the tenant, the following steps occurs:<\/p>\n<p>\u00a0<\/p>\n<ol>\n<li>The user tries to access an application, for example, Outlook Web App.<\/li>\n<li>If the user is not already signed in, the user is redirected to the Azure AD User Sign-in page.<\/li>\n<li>The user enters their username and password into the Azure AD sign in page, and then selects the Sign in button.<\/li>\n<li>Azure AD, on receiving the request to sign in, places the username and password (encrypted by using a public key) in a queue.<\/li>\n<li>An on-premises Authentication Agent retrieves the username and encrypted password from the queue. Note that the Agent doesn\u2019t frequently poll for requests from the queue but retrieves requests over pre-established persistent connection.<\/li>\n<li>The agent decrypts the password by using its private key.<\/li>\n<li>The agent validates the username and password against Active Directory by using standard Windows APIs, which is a similar mechanism to what Active Directory Federation Services (AD FS) uses. The username can be either the on-premises default username, usually userPrincipalName, or another attribute configured in Azure AD Connect (known as Alternate ID).<\/li>\n<li>The on-premises Active Directory domain controller (DC) evaluates the request and returns the appropriate response (success, failure, password expired, or user locked out) to the agent.<\/li>\n<li>The Authentication Agent, in turn, returns this response back to Azure AD.<\/li>\n<li>Azure AD evaluates the response and responds to the user as appropriate. For example, Azure AD either signs the user in immediately or requests for Azure Multi-Factor Authentication.<\/li>\n<li>If the user sign-in is successful, the user can access the application.<\/li>\n<\/ol>\n<p>\u00a0<\/p>\n<h2>On-premises user sign-in to Azure AD<\/h2>\n<p>Let us have a closer look to the sign-in progress from on-premises user to Azure AD.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2209\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/2-4.png\" alt=\"\" width=\"1743\" height=\"607\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/2-4.png 1743w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/2-4-300x104.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/2-4-768x267.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/2-4-1024x357.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/2-4-600x209.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/2-4-1600x557.png 1600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/2-4-780x272.png 780w\" sizes=\"(max-width: 1743px) 100vw, 1743px\" \/><\/p>\n<p>As we can see in the picture, the on-premises user credentials are \u201csent\u201d to the on-premises agent, these credentials will be validated against the local Active Directory. If the username and password are correct, the user will be able to login.<\/p>\n<p>Note: this is only working, if the user account is synchronized to the Azure Active Directory. In our case by using the Azure AD connect.<\/p>\n<p>\u00a0<\/p>\n<h2>Pass-through authentication<\/h2>\n<p>The pass-through authentication agent (AuthN agent) only requires outbound firewall ports. The necessary Ports for that are the Port 80 and the Port 443.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2210\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/3-3.png\" alt=\"\" width=\"1826\" height=\"956\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/3-3.png 1826w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/3-3-300x157.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/3-3-768x402.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/3-3-1024x536.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/3-3-600x314.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/3-3-1600x838.png 1600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/3-3-780x408.png 780w\" sizes=\"(max-width: 1826px) 100vw, 1826px\" \/><\/p>\n<p>Good to know for this solution is that multiple agents can be deployed for the performance and as well for fault tolerance. The communication between the sites works with https only and as default.<\/p>\n<p>\u00a0<\/p>\n<h2>Pass-through authentication installation \u2013 What is going on<\/h2>\n<p>Till this chapter we know how the pass-through authentication works and about what we need to think. However, let us have a short look about how the installation has to be done.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2211\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/4-3.png\" alt=\"\" width=\"1700\" height=\"901\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/4-3.png 1700w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/4-3-300x159.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/4-3-768x407.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/4-3-1024x543.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/4-3-600x318.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/4-3-1600x848.png 1600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/4-3-780x413.png 780w\" sizes=\"(max-width: 1700px) 100vw, 1700px\" \/><\/p>\n<p>By the installation we chose our Azure AD connect server and here we deploy the AuthN agent. The AuthN agent will create then a pair of key (private key and public key) and sends a certificate request to the Azure AD. This is possible because we already have installed and configured our Azure AD connect. Now the Azure Active Directory creates the certificate and stores it together with the public key by itself. The created certificate will be returned to the AuthN and the received certificate will be associated with the private key.<\/p>\n<p>\u00a0<\/p>\n<h2>Pass-through authentication installation \u2013 Steps<\/h2>\n<p>For PTA to be enabled on the Azure AD Connect server the following requirements apply:<\/p>\n<ul>\n<li>Azure AD Connect version 1.1.557.0 or later must be running on Windows 2012 R2.<\/li>\n<li>Port 80\/443 outbound need to be opened<\/li>\n<\/ul>\n<p><strong>Note<\/strong>: You can download the latest version of Azure AD Connect here: https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=47594. When writing the blogpost the latest version of Azure AD Connect was 1.1.647.0<\/p>\n<p>\u00a0<\/p>\n<p>In this step by step setup, we already had Azure AD Connect up and running (with password hash synchronization), so it\u2019s just a matter of changing the configuration.<\/p>\n<p>We start our <strong>Azure AD Connect<\/strong> and we choose <strong>configure<\/strong> and select here <strong>change user sign-in<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2212\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/01.png\" alt=\"\" width=\"602\" height=\"423\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/01.png 602w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/01-300x211.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/01-600x422.png 600w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/p>\n<p>Now we continue with clicking <strong>Next<\/strong> and here we enter our tenant administrator credentials. They are needed to be able to logon to Azure Active Directory and to enable PTA in AAD and to create the certificate.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2213\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/02.png\" alt=\"\" width=\"602\" height=\"423\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/02.png 602w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/02-300x211.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/02-600x422.png 600w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/p>\n<p>For the next step we have to click on <strong>Next<\/strong> and we will get on the User sign-in page. Here we have in total four options we can set:<\/p>\n<ul>\n<li>Password Synchronization (wrong name, should be Password Hash Synchronization).<\/li>\n<li>Pass-through authentication (this blog\u2019s topic).<\/li>\n<li>Federation with AD FS (future blog).<\/li>\n<li>Do not configure (when using a third party federation solution)<\/li>\n<\/ul>\n<p>If we want to enable single sign-on (SSO) we also need to mark the checkbox.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2214\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/03.png\" alt=\"\" width=\"602\" height=\"425\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/03.png 602w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/03-300x212.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/03-600x424.png 600w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/p>\n<p>For our case we need to select <strong>Pass-through authentication<\/strong> and then we continue clicking <strong>Next<\/strong>.<\/p>\n<p><strong>Note<\/strong>: the recommendation at the bottom of the page. This makes sense. We have to remember that setting PTA is a tenant wide setting, so ALL accounts in our tenant are forced to use PTA. If something goes wrong in our network and none of the AuthN agents are available, nobody can logon anymore. Therefore we need a cloud only admin account with a @<tenant>.onmicrosoft.com username to have a \u201cbackdoor\u201d for troubleshooting.<\/p>\n<p>If we now continue by clicking <strong>Next<\/strong>, the Azure AD Connect wizard will check our environment about installed components and if all went (as expected) well, we can start the configuration process.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2215\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/04.png\" alt=\"\" width=\"602\" height=\"427\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/04.png 602w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/04-300x213.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/04-600x426.png 600w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/p>\n<p>By clicking on <strong>Configure<\/strong>, the configuration will start straight away. From my point of view the most common configuration path form now is to change from Password Synchronization to Pass-through. That\u2019s why we continue from here with this solution way.<\/p>\n<p>After the configuration is finished, we can click <strong>Exit<\/strong>, and the wizard will be closed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2216\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/05.png\" alt=\"\" width=\"602\" height=\"423\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/05.png 602w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/05-300x211.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/05-600x422.png 600w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/p>\n<p>If we now open our web browser and logon to our Azure portal, we select <strong>Azure Active Directory<\/strong> and browse to <strong>Azure AD Connect<\/strong>, here we see that Pass-through authentication is now enabled:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2217\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/06.png\" alt=\"\" width=\"601\" height=\"322\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/06.png 601w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/06-300x161.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/06\/06-600x321.png 600w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/p>\n<p>Note: Pictures and some of the information in this chapter are taken from <a href=\"https:\/\/jaapwesselius.com\/about\/\" target=\"_blank\" rel=\"noopener\">Jaap Wesselius<\/a>.<\/p>\n<p>\u00a0<\/p>\n<h2>Conclusion<\/h2>\n<p>If you are looking for an alternative for authentication without ADFS, Pass-through can be a good one. In the Microsoft world for Azure and Office 365 it will work well. Today in a ADFS environment we don\u2019t have to setup the AAD in a redundant state. Important is that we have made a back up the config, which we can restore if needed. By using AAD for Pass-through the agents can be installed on each server which has a connection to the Active Directory and to the Microsoft cloud..<\/p>\n<p>If you need to setup a low cost authentication for Microsoft cloud services in the project, this can be a serious solution.<\/p>\n<p>\u00a0<\/p>\n<p><em>Photo by\u00a0<a href=\"https:\/\/unsplash.com\/photos\/G2ifDHnHZ6Y?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText\" target=\"_blank\" rel=\"noopener\">\u0160tefan \u0160tefan\u010d\u00edk<\/a><\/em><em>\u00a0on\u00a0<a href=\"https:\/\/unsplash.com\/search\/photos\/space?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText\" target=\"_blank\" rel=\"noopener\">Unsplash<\/a><\/em><\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As far we know until today, the best solution form the Microsoft point of view is, to use ADFS to authenticate on-premises users for cloud services such as Azure or Office 365. This is working very well and there are many articles about how to configure the clams etc. can be found in internet and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2189,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[4,12,1923],"tags":[],"class_list":["post-2188","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-adfs","category-azure","category-microsoft-365"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/2188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2188"}],"version-history":[{"count":8,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/2188\/revisions"}],"predecessor-version":[{"id":5222,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/2188\/revisions\/5222"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/media\/2189"}],"wp:attachment":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}