Azure AD/Office 365 seamless sign-in



Azure AD/Office 365 seamless sign-inPart 5 – Implement single sign-on (SSO) with AD FS in Windows Server 2016Microsoft FrancePublished: January 2017Version: 1.0Authors: Philippe Beraud (Microsoft France)Contributors/Reviewers: Philippe Maurent (Microsoft Corporation) For the latest information on Azure Active Directory, please see ? 2017 Microsoft Corporation. All rights reserved.Abstract: Through its support for standard protocols, Active Directory Federation Services (AD FS) provides claims-based (Web) single sign-on (also known as identity federation) with Azure Active Directory (Azure AD), and related services such has the Microsoft Office 365 offering and its Web application and rich client applications. In addition to the third part, which is intended to provide a better understanding of the different single sign-on deployment options with Azure AD/Office 365, how to enable single sign-on using corporate Active Directory credentials and AD FS to Azure AD/Office 365, and the different configuration elements to be aware of for such deployment, this document provides a complete end-to-end walkthrough to rollout a fully operational configuration in Azure.By following the steps outlined in this document you should be able to successfully configure your environment to deploy AD FS, setup Azure AD/Office 365 single sign-on, and start using it within your organization to provide a seamless sign-in experience for end-users accessing Azure AD/Office 365 resources.Table of Contents TOC \o "1-2" \h \z \u Important notice PAGEREF _Toc473189430 \h 1Introduction PAGEREF _Toc473189431 \h 2Objectives of this paper PAGEREF _Toc473189432 \h 2Non-objectives of this paper PAGEREF _Toc473189433 \h 2Organization of this paper PAGEREF _Toc473189434 \h 3About the audience PAGEREF _Toc473189435 \h 3Setting up the base configuration test lab PAGEREF _Toc473189436 \h 4Accessing the various machines of the test lab environment PAGEREF _Toc473189437 \h 5Finalizing the configuration of the domain controllers PAGEREF _Toc473189438 \h 6Configuring the AD FS farm PAGEREF _Toc473189439 \h 6Configuring the WAP farm PAGEREF _Toc473189440 \h 15Setting up single sign-on with the Azure AD/Office 365 tenant PAGEREF _Toc473189441 \h 25Downloading Azure AD Connect PAGEREF _Toc473189442 \h 25Executing Azure AD Connect PAGEREF _Toc473189443 \h 27Configuring additional tasks PAGEREF _Toc473189444 \h 39Verifying the synchronization on the Azure AD/Office 365 tenant PAGEREF _Toc473189445 \h 40Verifying the single sign-on with the Azure AD/Office 365 tenant PAGEREF _Toc473189446 \h 41Monitoring your on-premises deployment (Optional) PAGEREF _Toc473189447 \h 43Getting started with the Azure AD Connect Health service PAGEREF _Toc473189448 \h 43Configuring Azure AD Connect Health for Sync PAGEREF _Toc473189449 \h 45Important noticePart 3 provides an understanding of how to enable single sign-on using corporate Active Directory credentials and AD FS in Windows Server 2012 R2 to Azure AD/Office 365, and the different configuration elements to be aware of for such deployment. Same considerations apply here with AD FS in Windows Server 2016Furthermore, by leveraging the Azure-based evaluation lab environment configured thanks to the guidance of Part 2, Part 5, i.e. this document, provides an instrumented end-to-end walkthrough to further familiarize yourself with both the installation and configuration of the related highly available infrastructure.It guides you to manually build your AD FS highly available environment w/ an AD FS farm and a WAP farm, and then leverages Azure AD Connect to connect to Azure AD/Office 365. IntroductionMicrosoft Office 365 provides secure anywhere access to professional email, shared calendars, instant messaging (IM), video conferencing, document collaboration, etc. It represents the cloud version of the Microsoft communication and collaboration products with the latest version of the Microsoft desktop suite for businesses of all sizes.Azure Active Directory (Azure AD) is the directory behind Office 365 used to store user identities and other tenant properties.?Just like the on-premises Active Directory stores the information for Exchange, SharePoint, Lync and your custom Line of Business (LOB) apps, Azure AD stores the information for Exchange Online, SharePoint Online, Skype for Business Online, etc., and any custom applications built in the Microsoft’s cloud.Through the single sign-on feature, Azure AD provides organizations with the ability to authenticate against the organization’s Active Directory (or other identity repositories), allowing their users to use their corporate credentials to access Azure AD/Office 365 and the services that they have been provisioned for. Objectives of this paperAs previously noticed, this document complements the third part entitled Azure AD/Office 365 seamless Single Sign-in – Part 3 by providing an end-to-end walkthrough to rollout a working single sign-on configuration for Azure AD/Office 365 with AD FS. As such, it features Windows Server 2016 in lieu of Windows Server 2012 R2. NoteFor information on AD FS in Windows Server 2016, see article What's new in Active Directory Federation Services for Windows Server 2016.Non-objectives of this paperThis document doesn’t provide a full description of AD FS in Windows Server 2016. It doesn’t provide neither guidance for setting up and configuring AD FS in a production environment nor a complete technical reference for AD FS.NoteFor information on AD FS, please refer to the product documentation, the article AD FS Frequently Asked Questions (FAQ), and the dedicated AD FS Q&A forum.It doesn’t neither provide an understanding of the different single sign-on deployment options with Azure AD/Office 365, how to enable single sign-on using corporate AD credentials and AD FS to Azure AD/Office 365, and the different configuration elements to be aware of for such deployment. This is specifically the intent of the aforementioned first part that covers all the key aspects the readers should understand to successfully achieve single sign-on with Azure AD/Office 365 for their anization of this paperTo cover the aforementioned objectives, this document is organized in the following 3 sections: REF _Ref471311815 \h \* MERGEFORMAT Setting up the base configuration test lab. REF _Ref471311827 \h \* MERGEFORMAT Setting up single sign-on with the Azure AD/Office 365 tenant. REF _Ref471556050 \h \* MERGEFORMAT Monitoring your on-premises deployment (Optional).These sections provide the information details necessary to (hopefully) successfully build a working environment for the scenario. They must be followed in order.About the audienceIdentity federation ? also known as (cross-domain) single sign-on ? in general is a broad topic, with many facets, depths of understanding, protocols, standards, tokens, etc. This paper addresses the single sign-on topic only from the Azure AD/Office 365 perspective and from both conceptual and technical levels. This document is thus intended for system architects and IT professionals who are interested in understanding this capability of Azure AD/Office 365 from a hand-practice perspective.Setting up the base configuration test labBy following the instructions outlined hereafter, you should be able to successfully prepare your on-premises test lab environment based on virtual machines (VMs) running in Azure to later deploy and configure the test environment, install and configure it.In order to complete the document’s walkthrough, you need an environment that consists of the following components for the Azure-based test lab infrastructure:Two computers running Windows Server 2016 (named DC1 respectively DC2 by default) that will be configured as a domain controller with a test user and group accounts, and Domain Name System (DNS) servers. DC1 will host Azure AD Connect for the sync between the Azure-based test lab infrastructure and the Azure AD/Office 365 subscription. Alternatively, DC2 will be configured as an enterprise root certification authority (PKI server),Two intranet member server running Windows Server 2016 (named ADFS1 respectively ADFS2 by default) that will be configured as an AD FS farm.Two Internet-facing member server running Windows Server 2016 (named WAP1 respectively WAP2 by default) that is configured as Web servers for the Web Application Proxy (WAP) farm.Note Windows Server 2016 offers businesses and hosting providers a scalable, dynamic, and multitenant-aware infrastructure that is optimized for the cloud. For more information, see the Microsoft TechNet Windows Server 2016 homepage.If you’ve already followed the walkthrough of Part 2, all the components that pertains to the above Azure-based test lab infrastructure should already be in place with the six VMs running Windows Server 2016. If you haven’t yet conducted this rollout, this is the time to do so.Note For information on the AD FS requirements in Windows Server 2016, see eponym article AD FS Requirements.The rest of this document makes the assumption that such an evaluation environment is in place.The above Azure VMs will enable you to:Connect to the Internet to install updates, and access Internet resources in real time. Later configure them with Azure AD Connect to finally get a relevant Azure-based test infrastructure.Remotely managed those using a Point-to-Site (P2S) connection and then Remote Desktop (RDP) connections by your computer that is connected to the Internet or your organization network.NoteYou must be logged on as a member of the Domain Admins group or a member of the Administrators group on each computer to complete the tasks described in this guide. If you cannot complete a task while you are logged on with an account that is a member of the Administrators group, try performing the task while you are logged on with an account that is a member of the Domain Admins group.Create snapshots so that you can easily return to a desired configuration for further learning and experimentation.For illustration purposes, we’ve opted to configure the domain (LITWARE369). You will have to choose in lieu of a domain name of yours. For checking purpose, you can for instance use the domain search capability provided by several popular domain name registrars. Whenever a reference to is made in a procedure, it has to be replaced by the DNS domain name of your choice to reflect accordingly the change in naming. Likewise, any reference to LITWARE369 should be substituted by the NETBIOS domain name of your choice.For the sake of simplicity, the same password "Pass@word1!?" is used throughout the procedures detailed in this document. This is neither mandatory nor recommended in a real world scenario.To perform all the tasks in this guide, we will use the local administrator account AzureAdmin or alternatively the LITWARE369 domain administrator account AzureAdmin for each VM, unless instructed otherwise.Note The article Windows Server 2016 and 2012 R2 AD FS Deployment Guide can be used as a companion guide throughout this walkthrough. Accessing the various machines of the test lab environmentSee eponym section in Part 2 of this whitepaper.Finalizing the configuration of the domain controllersTo finalize the configuration of the domain controllers in our test lab environment, you will need to create a group Managed Service Account (gSMA).A gMSA account will be required during the AD FS installation and configuration. The benefit of using a gMSA is its auto-negotiated password update feature.To create the gMSA account, proceed with the following steps:Open a remote desktop connection on the DC1 computer. Follow the instructions as per section § REF _Ref471576854 \h \* MERGEFORMAT Accessing the various machines of the test lab environment and specify in step 2 "10.0.0.101" for the DC1 computer. Log on as the LITWARE369 domain administrator account AzureAdmin with "Pass@word1!?" as password.Open an elevated Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt, and then run the following command to verify whether the KDS Root Key has been created in the LITWARE369 domain to enable gMSA in your domain: PS C:\> Get-KdsRootKeyIf it has not been created (the output displays no information), run the following command to create the key:PS C:\> Add-KdsRootKey –EffectiveTime (Get-Date).AddHours(-10)Guid----99490123-7d38-c01e-05c7-539224fa88eaPS C:\>Run the following command:PS C:\> New-ADServiceAccount FsGmsa -DNSHostName adfs. -ServicePrincipalNames http/adfs.Configuring the AD FS farmThe AD FS farm is constituted by the ADFS1 and ADFS2 computers along with the internal load balancer.Deploying the primary federation server in the AD FS farmThis section walks you through the deployment of the primary federation server on the ADFS1 computer with the following steps: REF _Ref471219165 \h Issuing a SSL/TLS certificate. REF _Ref471218804 \h Installing and configuring the AD FS role service. REF _Ref471218811 \h Activating the Device Registration Service (DRS).Important note You must have domain administrator permissions to deploy the AD FS role service.The following subsections describe each of these steps in the context of our test lab environment. Issuing a SSL/TLS certificate The AD FS role service will require a server SSL/TLS certificate. The certificate MUST have the following attributes:Subject Name (CN): adfs.Subject Alternative Name (DNS): adfs.Subject Alternative Name (DNS): enterpriseregistration.Note For more information about setting up SSL/TLS certificates, see article Configure SSL/TLS on a Web site in the domain with an Enterprise CA.To issue the SSL/TLS certificate, proceed with the following steps:Open a remote desktop connection on the ADFS1 computer. Follow the instructions as per section § REF _Ref471576854 \h \* MERGEFORMAT Accessing the various machines of the test lab environment and specify in step 2 "10.0.0.201" for the ADFS1 computer. Log on as the LITWARE369 domain administrator account AzureAdmin with "Pass@word1!?" as password.Open an elevated Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt, and then run the following command:PS C:\> Get-Certificate -Template SSLCertificates -SubjectName CN=adfs. ` –DnsName adfs., enterpriseregistration. -CertStoreLocation cert:\LocalMachine\My Status Certificate Request ------ ----------- ------- Issued [Subject]…PS C:\> _Note If you have not configured a new certificate template (e.g. the SSLCertificates in our configuration), you can use the WebServer certificate template in lieu of in the above command.NoteFor more information, see article AD CS Administration Cmdlets in Windows PowerShell.The SSL/TLS certificate should now be imported into the Local Computer\My Store on the ADFS1 computer. Verify whether the SSL/TLS certificate has been imported by running the following command:PS C:\> dir Cert:\LocalMachine\My PSParentPath: Microsoft.PowerShell.Security\Certificate::LocalMachine\MyThumbprint Subject---------- -------A85A5A2EF025C1B9B17CF569EA2F02E9E8E71EAA DC=Windows Azure CRP Certificate Generator3361995F9929C7269886A9DC276122B493D3C4A5 CN=8848a529-9d69-4049-8469-8218547a61e21AB39482CF731EB9C51C3A99BE19E828E7C58527 CN=adfs.PS C:\> _The certificates are listed by their thumbprint in the Local Computer\My Store. We will be later interested in the thumbprint of the newly issued certificate, i.e. the one whose CN equals adfs., for example in our configuration: 1AB39482CF731EB9C51C3A99BE19E828E7C58527.Export the issued certificate with its private key for later use on the ADFS2 computer:From the previous elevated Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt, and open mmc.exe. Click File | Add/Remove Snap-in… Select Certificates in Available snap-ins and then click Add. A Certificates snap-in dialog opens up.Select Computer account, click Next, and then click Finish. Click OK to close the dialog.Right-click the adfs. certificate, click All Tasks, and then click Export. The Certificate Export Wizard opens up.Click Next, select Yes, export the private key, and then click Next.On Export File Format, leave Personal Information Exchange – PKCS #12 (.PFX) selected, and then click Next. On Security, check Password, and type “Pass@word1!?” twice. Then click Next.On File to Export, browse to the location to which you want to export the SSL/TLS certificate. For File name, name the certificate file, for example "ADFSLitware369" in our configuration. Then click Next.Click Finish to export the certificate. Click OK to close the dialog.Installing and configuring the AD FS role serviceTo install and configure the AD FS role service, proceed with the following steps:From the previous elevated Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt, run the following command:PS C:\> Install-windowsfeature adfs-federation –IncludeManagementToolsSuccess Restart Needed Exit Code Feature Result------- -------------- --------- --------------True No Success {Active Directory Federation Services}WARNING: To finish configuring this server for the federation server role using Windows PowerShell, see C:\> _Run the following commands to create a Windows Internal Database (WID) along with the required gMSA account: PS C:\> Import-Module ADFSPS C:\> $certificateThumbprint = (Get-ChildItem cert:\LocalMachine\MY -DnsName "*adfs*" | Select-Object ` -First 1).ThumbprintPS C:\>?Install-AdfsFarm –CertificateThumbprint $certificateThumbprint -FederationServiceDisplayName "Litware369" ` -FederationServiceName "adfs." –GroupServiceAccountIdentifier "LITWARE369\FsGmsa$"WARNING: The root key for the group Managed Service Account was created at 1/3/2017 9:39:52 AM. If you have more thanone domain controller in your Active Directory forest, the key may not yet have replicated to all domain controllersand therefore the service may not successfully install or start. To avoid service startup problems, wait 10 hours toensure the key has replicated to all DCs before completing the Active Directory Federation Services ConfigurationWizard, executing Install-AdfsFarm or Add-AdfsFarmNode on any other servers in your network, or restarting any AD FSservice.Message Context Status------- ------- ------The configuration completed successf... DeploymentSucceeded SuccessPS C:\> _Important noteThe ‘$’ at the end of the gMSA account is required.NoteIf this is NOT the first time you run this command, add –OverwriteConfiguration.Activating the Device Registration Service (DRS)As discussed in the first part of the whitepaper, the AD Workplace Join capability allows users to join their devices with the organization’s workplace to access company resources and services. When a device is joined by Workplace Join, it becomes a known device. Attributes of the device can then be retrieved from AD to drive conditional access to authorize issuance of security tokens for the targeted applications. Windows?8.1, Android 4.0+, and iOS 6+ devices can be joined by using Workplace Join.Workplace Join is made possible by Device Registration Service (DRS) that is included with AD FS. When a device is joined by Workplace Join, DRS provisions a device object in AD and sets a certificate on the consumer device that is used to represent the device identity. DRS is meant to face both internal and external resources. Organizations that deploy DRS along with WAP can join devices that use Workplace Join from any Internet-connected location.NoteFor more information, see article Join to Workplace from Any Device for SSO and Seamless Second Factor Authentication Across Company Applications.The DRS capability has to be initialized and enabled on the AD FS farm.To enable the DRS capability on the ADFS1 computer, proceed with the following steps:From the previous elevated Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt, run the following command:PS C:\> Initialize-ADDeviceRegistration -ServiceAccountName "LITWARE369\FsGmsa$"When prompted for a confirmation, press “Y” to validate.PS C:\> Initialize-ADDeviceRegistration -ServiceAccountName "LITWARE369\FsGmsa$"This command will prepare Active Directory to host Device Registration Service in the current forest.Do you want to continue with this operation?[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): YWARNING: The Active Directory forest has been prepared for Device Registration. To use the AD FS Device RegistrationService, run the Enable-AdfsDeviceRegistration cmdlet on each node in your AD FS farm.Message Context Status------- ------- ------The configuration completed successf... DeploymentSucceeded SuccessPS C:\> _You should see a message about device registration being successful.NoteFor more information, see article Configure On-Premises Conditional Access using registered devices.Configuring the secondary federation server in the AD FS farmThis section walks you through the deployment of the secondary federation server on the ADFS2 computer with the following steps: REF _Ref471227679 \h Importing the SSL/TLS certificate issued on ADFS1. REF _Ref471227719 \h Installing and configuring the AD FS role service for the second node. REF _Ref471227724 \h Activating the Device Registration Service (DRS).The following subsections describe each of these steps in the context of our test lab environment. Importing the SSL/TLS certificate issued on ADFS1As mentioned earlier, the AD FS role service will require a server SSL/TLS certificate. To import the certificate previously issued on the ADFS1 computer, proceed with the following steps:Open a remote desktop connection on the ADFS2 computer. Follow the instructions as per section § REF _Ref471576854 \h \* MERGEFORMAT Accessing the various machines of the test lab environment and specify in step 2 "10.0.0.202" for the ADFS2 computer. Log on as the LITWARE369 domain administrator account AzureAdmin with "Pass@word1!?" as password.Open a Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt.Copy the ADFSLitware369.pfx file from the ADFS1 computer to the ADFS2 computer.Double-click the file. A Certificate Import Wizard opens up. Select Local Machine and click Next twice.On Private key protection, type the password, i.e. "Pass@word1!?" in our illustration, and then click Next twice.Click Finish. Click OK to close the message box that confirms a successful import.Installing and configuring the AD FS role service for the second nodeTo install and configure the AD FS role service on the ADFS2 computer, proceed with the following steps:Open an elevated Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt, and then run the following command:PS C:\> Install-windowsfeature adfs-federation –IncludeManagementToolsSuccess Restart Needed Exit Code Feature Result------- -------------- --------- --------------True No Success {Active Directory Federation Services}WARNING: To finish configuring this server for the federation server role using Windows PowerShell, see C:\>Run the following commands to add the ADFS2 computer as node of the existing AD FS farm: PS C:\> Import-Module ADFSPS C:\> $certificateThumbprint = (Get-ChildItem cert:\LocalMachine\MY -DnsName "*adfs*" | Select-Object -First 1).ThumbprintPS C:\>?Add-AdfsFarmNode -GroupServiceAccountIdentifier "LITWARE369\FsGmsa$" ` -PrimaryComputerName "adfs1." –CertificateThumbprint $certificateThumbprintMessage Context Status------- ------- ------The configuration completed successf... DeploymentSucceeded SuccessPS C:\>Important noteThe ‘$’ at the end of the gMSA account is required.NoteIf this is NOT the first time you run this command, add –OverwriteConfiguration. REF _Ref376248151 \h Testing the AD FS configurationDepending upon how Internet Explorer is configured you will either be prompted to provide credentials or be automatically signed-in.Before testing the configuration, if you want to have users be automatically signed-in, you will then need to configure your browser settings to trust the AD FS farms by adding your federation service name (for example in our configuration, ) to the browser’s local intranet zone. This will enable seamless sign-in using Windows Integrated Authentication (WIA).To test the AD FS configuration, proceed with the following steps:Open a remote desktop connection on the ADFS1 computer. Follow the instructions as per section § REF _Ref471576854 \h \* MERGEFORMAT Accessing the various machines of the test lab environment and specify in step 2 "10.0.0.201" for the ADFS1 computer. Log on as the LITWARE369 domain administrator account AzureAdmin with “Pass@word1!?” as password.Open a Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt.Start Internet Explorer and select Internet Options on the Tools menu. An Internet Options dialog pops up.Click the Security tab, select the Local intranet zone, and then click Sites. A Local intranet dialog appears.Click Advanced. In Add this website to the zone, type "", and then click Add. You should replace by your own domain as already mentioned.Click Close, and then click OK. Verify that the security level for the zone is set to the default setting of Medium-low which enables Windows integrated authentication for Intranet zones.Click OK to close the Internet Options dialog.Open a browsing session and navigate to the federation service metadata endpoint, for example, in our configuration: If in your browser window you can see the federation server metadata without any TLS errors or warnings, your federation server is operational.You can alternatively navigate to the metadata exchange endpoint, which offers an XML service description: You can alternatively navigate to the AD FS IdP sign-in page (../adfs/ls/idpinitiatedsignon.aspx). This offers a simple way of validating login via AD FS. However, with Windows Server 2016, this page is no longer surfaced “out-of-the-box”. In order to use it, this page must need to be enabled first. Otherwise, navigating to this sign-in page, will produce?an error. To switch back on this page:Open a Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt.Run the followings commands:PS C:\> Import-Module ADFSPS C:\> Set-AdfsProperties -EnableIdpInitiatedSignon $trueNow navigate to the AD FS IdP sign-in page (../adfs/ls/idpinitiatedsignon.aspx), for example in our configuration: This should display the AD FS IdP sign-in page where you can sign in with the domain credentials. Click Sign in to verify that the user is successfully and seamlessly authenticated thanks to the Windows Integrated Authentication. You shouldn’t see any Windows Security dialog if AD FS has been properly configured.Repeat steps 1 to 14 on the ADFS2 computer (10.0.0.202) with the exception of step 12. Log on as the LITWARE369 domain administrator account AzureAdmin with “Pass@word1!?” as password.Testing AD FS farm high availabilityTo test the AD FS farm high availability, shutdown the AD FS federation servers in the AD FS farm one at a time and check that you can still access AD FS with each computer offline: ADFS1 and ADFS2. This will test the failure of losing one of the servers in the internal load balancer.At this stage, you are now setup with a highly available AD FS solution for all internal users of the LITWARE369 domain. Let’s setup the Web Application Proxy (WAP) farm so that the external users have access too.Configuring the WAP farmThe WAP farm is constituted by the WAP1 and WAP2 computers along with the Internet load balancer.Note For more information, see article Web Application Proxy in Windows Server 2016.Configuring the first server in the WAP farmTo prepare the first server in the WAP farm, proceed with the following steps in order: REF _Ref471307463 \h Updating the HOSTS file. REF _Ref376248156 \h Issuing a SSL/TLS certificate. REF _Ref471234181 \h Installing and configuring the Web Server (IIS) role service. REF _Ref471234192 \h Configuring HTTPS on the default web site. REF _Ref377137423 \h Deploying the Web Application Proxy (WAP).The following subsections describe each of these steps in the context of our test lab environment.Updating the HOSTS fileThe WAP servers need to make contact back to the AD FS servers, So, you need to tell the WAP servers how to get to them. The simplest way of doing this consists in editing the local HOSTS file on the WAP1 computer. Keep in mind that we don’t have connectivity or the ability to route to the internal IP address, so we need to route to the external IP of the internal load balancer that holds the two AD FS computers ADFS1 and ADFS2.To update the HOSTS file, proceed with the following steps:Launch the text editor of your choice, navigate to C:\Windows\System32\drivers\etc and open the HOSTS file.Add the following line at the end of the file. This will ensure that all communication regarding adfs. end up at the internal load balancer (ILB) adfs-lb and are appropriately routed to the AD FS farm.10.0.0.200 adfs.Save the file and close the editor. Issuing a SSL/TLS certificateThe default web site will require a server SSL/TLS certificate. The certificate MUST have the following attributes:Subject Name (CN): Subject Alternative Name (DNS): adfs.Subject Alternative Name (DNS): enterpriseregistration.Subject Alternative Name (DNS): For demonstration purpose, you can issue such a SSL/TLS certificate with the test lab certification authority litware369-DC2-CA as illustrated hereafter.You can instead use a SSL/TLS certificate issued from a public certification authority is required. The exact method depends on the chosen public certification authority. Please refer to their instructions.With the exception of the SSL/TLS certificate import into the Local Computer\My Store on the WAP1 computer, the rest of the suggested configuration doesn’t differ from the one illustrated in this document.To issue the SSL/TLS certificate with the test lab certification authority, proceed with the following steps:Open a remote desktop connection on the WAP1 computer. Follow the instructions as per section § REF _Ref471576854 \h \* MERGEFORMAT Accessing the various machines of the test lab environment and specify in step 2 "10.0.1.101" for the WAP1 computer. Log on as the LITWARE369 domain administrator account AzureAdmin with "Pass@word1!?" as password.Open a Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt, and then run the following command:PS C:\> Get-Certificate -Template SSLCertificates -SubjectName CN= –DnsName adfs., enterpriseregistration., -CertStoreLocation cert:\LocalMachine\My Status Certificate Request ------ ----------- ------- Issued [Subject]…PS C:\> _Note If you haven’t previously configured a new certificate template (e.g. the SSLCertificates in our configuration), you can use the WebServer certificate template in lieu of in the above command.Export the issued certificate with its private key for later use on the WAP2 computer:From the previous elevated Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt, and open mmc.exe. Click File | Add/Remove Snap-in… Select Certificates in Available snap-ins and then click Add. A Certificates snap-in dialog opens up.Select Computer account, click Next, and then click Finish. Click OK to close the dialog.Right-click the certificate, click All Tasks, and then click Export. The Certificate Export Wizard opens up.Click Next, select Yes, export the private key, and then click Next.On Export File Format, leave Personal Information Exchange – PKCS #12 (.PFX) selected, and then click Next. On Security, check Password, and type “Pass@word1!?” twice. Then click Next.On File to Export, browse to the location to which you want to export the SSL/TLS certificate. For File name, name the certificate file, for example "WAPLitware369" in our configuration. Then click Next.Click Finish to export the certificate. Click OK to close the dialog.Installing and configuring the Web Server (IIS) role serviceTo install the Web Server (IIS) role service on the WAP1 computer, from the previous Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt, run the following command:PS C:\> Install-windowsfeature web-server –IncludeManagementToolsSuccess Restart Needed Exit Code Feature Result------- -------------- --------- --------------True No Success {Common HTTP Features, Default Document, D...PS C:\> _Configuring HTTPS on the default web siteTo configure HTTPS on the default web site, proceed with the following steps:Open an elevated Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt if none, and run the following command to add a SSL/TLS binding to the default web Site:PS C:\> New-WebBinding -Name "Default Web Site" -IP "*" -Port 443 -Protocol httpsRun the following commands to associate the imported SSL/TLS certificate to the newly created SSL/TLS binding:PS C:\> Get-ChildItem cert:\LocalMachine\MY | where { $_.Subject -match "CN\=" } | select -First 1 | New-Item IIS:\SslBindings\0.0.0.0!443IP Address Port Host Name Store Sites---------- ---- --------- ----- -----0.0.0.0 443 MY Default Web SitePS C:\> _Open a browsing session and navigate to the default web site at the Web Application Proxy (WAP)The Web Application Proxy (WAP) is the proxy for AD FS in Windows Server 2016.To install and configure the Web Application Proxy role service, proceed with the following steps:Open an elevated Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt if none, and run the following command: PS C:\> Install-WindowsFeature Web-Application-Proxy –IncludeManagementToolsSuccess Restart Needed Exit Code Feature Result------- -------------- --------- --------------True No Success {RAS Connection Manager Administration Kit...WARNING: To finish configuring this server for the Web Application Proxy role service using Windows PowerShell, see C:\> _Run the following commands to set the credential of the LITWARE369\AzureAdmin user:PS C:\> $domain = ""PS C:\> $password = "Pass@word1!?" | ConvertTo-SecureString -asPlainText -ForcePS C:\> $username = "$domain\AzureAdmin" PS C:\> $credential = New-Object System.Management.Automation.PSCredential($username,$password)Run the following commands to install and configure the Web Application Proxy (WAP):PS C:\> $certificateThumbprint = (Get-ChildItem cert:\LocalMachine\MY -DnsName "*adfs*" | Select-Object -First 1).ThumbprintPS C:\>?Install-WebApplicationProxy -FederationServiceTrustCredential $credential -CertificateThumbprint $certificateThumbprint -FederationServiceName "adfs." Message Context Status------- ------- ------The configuration completed successf... DeploymentSucceeded SuccessPS C:\> _NoteFor more information, see article Web Application Proxy Cmdlets.Configuring the second server in the WAP farmThis section walks you through the deployment of the web application proxy on the WAP2 computer with the following steps: REF _Ref471311028 \h Importing the SSL/TLS certificate issued on WAP1. REF _Ref471311032 \h Installing and configuring the Web Server (IIS) role service. REF _Ref471311036 \h Configuring HTTPS on the default web site. REF _Ref471311040 \h Deploying the Web Application Proxy (WAP).The following subsections describe each of these steps in the context of our test lab environment. Importing the SSL/TLS certificate issued on WAP1As mentioned earlier, the Web Application proxy (WAP) role service will require a server SSL/TLS certificate. To import the certificate previously issued on the WAP1 computer, proceed with the following steps:Open a remote desktop connection on the WAP2 computer. Follow the instructions as per section § REF _Ref471576854 \h \* MERGEFORMAT Accessing the various machines of the test lab environment and specify in step 2 "10.0.0.201" for the WAP2 computer. Log on as the local administrator account AzureAdmin with "Pass@word1!?" as password.Open a Windows PowerShell or PowerShell Integrated Scripting Environment (ISE) prompt.Copy the WAPLitware369.pfx file from the ADFS1 computer to the ADFS2 computer.Double-click the file. A Certificate Import Wizard opens up. Select Local Machine and click Next twice.On Private key protection, type the password, i.e. "Pass@word1!?" in our illustration, and then click Next twice.Click Finish. Click OK to close the message box that confirms a successful import.Installing and configuring the Web Server (IIS) role serviceTo install and configure the Web Server (IIS) role service on the WAP2 computer, proceed as per eponym section § REF _Ref471311032 \h \* MERGEFORMAT Installing and configuring the Web Server (IIS) role service for the WAP1 computer. Configuring HTTPS on the default web siteTo configure HTTPS on the default web site on the WAP2 computer, proceed as per eponym section § REF _Ref471311036 \h \* MERGEFORMAT Configuring HTTPS on the default web site for the WAP1 computer.Deploying the Web Application Proxy (WAP)To deploy the Web Application Proxy (WAP) on the WAP2 computer, proceed as per eponym section § REF _Ref471311040 \h \* MERGEFORMAT Deploying the Web Application Proxy (WAP) for the WAP1 computer. REF _Ref376248151 \h Testing the WAP configurationTo verify that you can successfully authenticate against the federation server on the Internet, proceed with the following steps:Open a browsing session on your external local computer and navigate on Internet to the SSL/TLS certificate used in the configuration has not been issued by a public certification authority, you will need to add the test lab certification authority Litware369-DC2-CA root certificate in the trusted root certification authorities of your local computer.As before, this displays the AD FS sign-in page where you can sign in with the domain credentials.Click SignIn to verify that you can successfully be authenticated.Log on as the LIWARE369\JanetS with “Pass@word1!?” as password.Click Sign Out.Testing WAP farm high availabilityTo test the WAP farm high availability, shutdown the WAP servers in the WAP farm one at a time and check that you can still access the above AD FS IdpInitiatedSignOn.aspx page with each computer offline: WAP1 and WAP2. This will test the failure of losing one of the servers in the Internet load balancer.At this stage, the base configuration is now complete.To avoid spending your credit when you don’t work on the test lab environment, you can shut down the six VMs (DC1, DC2, ADFS1, ADFS2, WAP1, and WAP2) when you don’t work on the test lab.To shut down the VMs of the test lab environment, proceed with the following steps:Open a browsing session and navigate to the Azure portal at in with your administrative credentials to your Azure subscription in which you’ve deployed the test lab environment. On the left pane of the Azure portal, click virtual machines.On the virtual machine page, select wap1. A new blade opens up.Click Stop. A dialog pops up.Click Yes to confirm the shutdown.Repeat steps 4 to 6 with wap2, adfs2, adfs1, dc2, and then dc1.To resume working on the test lab environment, you will then need to start the six VMs that constitute it.To start the VMs of the test lab environment, proceed with the following steps:From the Azure portal, click virtual machines.On the virtual machine page, select dc1. A new blade opens up.Click Start. Repeat steps 2 to 3 with dc2, adfs1, adfs2, wap1, and then wap2.Setting up single sign-on with the Azure AD/Office 365 tenantThis section provides a walkthrough on how to setup single sign-on between the on-premises Active Directory (e.g. ) and the Azure AD/Office 365 tenant (e.g. litware369.) to offer a seamless user experience to access cloud resources, for example an Office 365 Enterprise E3 subscription in our configuration.For the sake of simplicity, and to set up the directory synchronization and the federation between the on-premises infrastructure of our test lab environment in Azure and the litware369. tenant in the cloud, we will leverage the single and unified wizard Azure Active Directory Connect (Azure AD Connect).Azure AD Connect indeed provides a single and unified wizard that streamlines the overall onboarding process for both directory synchronization (single or multiple directories) AND single sign-on if you want to, and thus that automatically performs the following steps: download and setup of all the pre-requisites, download, setup and guided configuration of the synchronization engine, activation of the synchronization in the Azure AD tenant, setup, and/or configuration of AD FS, etc.Azure AD Connect is the one stop shop for connecting your on-premises directories to Azure AD, whether you are evaluating, piloting, or in production.NoteFor more information, see article Integrating your on-premises identities with Azure Active Directory.This section walks you through the use of the single wizard Azure AD Connect on the ADFS1 computer to fully configure the Azure-based infrastructure from an identity perspective and establish the identity bridge between it and your Azure AD/Office 365 subscription. It comprises the following five steps: REF _Ref376247961 \h Downloading Azure AD Connect. REF _Ref421110204 \h Executing Azure AD Connect. REF _Ref421629948 \h Configuring additional tasks. REF _Ref376248629 \h Verifying the synchronization on the Azure AD/Office 365 tenant. REF _Ref375659149 \h Verifying the single sign-on with the Azure AD/Office 365 tenant.The following subsections describe each of these steps in the context of our test lab environment.Downloading Azure AD ConnectAzure AD Connect is a single wizard that performs all the steps you would otherwise have to do manually to connect your Active Directory (and local directories if any) to Azure AD. Azure AD Connect will:Install pre-requisites like the Azure Active Directory Module for Windows PowerShell (64-bit version) and Microsoft Online Services Sign-In Assistant. NoteThe?Azure Active Directory PowerShell Module?is regularly updated with new features and functionality. The above link should always point to the most current version of the module. For more information, see article Microsoft Azure Active Directory PowerShell Module Version Release History.Install and configure the sync engine, and enable directory synchronization in the customer's Azure tenant.Configures either password sync (w/ optional seamless single sign-on), path-through authentication (w/ optional seamless single sign-on), or AD FS, depending on which sign-on option the customer prefers, and includes any required configuration in Azure.Verifies everything is working.Azure AD Connect is the best way to connect your on-premises directory with Azure AD and Office 365. Azure AD Connect is replacing DirSync and Azure AD Sync and these two older sync engines are deprecated from April 13, 2016 reaching end of support April 13,2017.? NoteFor more information, see article Upgrade Windows Azure Active Directory Sync (“DirSync”) and Azure Active Directory Sync (“Azure AD Sync”).To download the latest version of Azure AD Connect (e.g. version 1.1.380.0 at the time of this writing), proceed with the following steps:Open a remote desktop connection on the DC1 computer. Follow the instructions as per section § REF _Ref471576854 \h \* MERGEFORMAT Accessing the various machines of the test lab environment and specify in step 2 "10.0.0.101" for the DC1 computer. Log on as the LITWARE369 domain administrator account AzureAdmin with “Pass@word1!?” as password.Open a browsing session and navigate to:. Click Download to download the Azure AD Connect MSI file (AzureADConnect.msi).Click Save.Executing Azure AD ConnectBefore executing Azure AD Connect, you must know the credentials:A domain account that is local administrator on the aforementioned computers.Active Directory enterprise administrator credentials.Azure AD tenant global administrator credentials.If you’ve followed in order all the steps outlined before, all the above prerequisites should be enforced at this stage. So you should be good to go.To execute Azure AD Connect and configure your identity infrastructure, proceed with the following steps:Open a remote desktop connection on the DC1 computer that will be also your sync server. Follow the instructions as per section § REF _Ref471576854 \h \* MERGEFORMAT Accessing the various machines of the test lab environment and specify in step 2 "10.0.0.101" for the DC1 computer. Log on as the LITWARE369 domain administrator account AzureAdmin with "Pass@word1!?” as password.Run AzureADConnect.msi to launch the wizard.On the Welcome to Azure AD Connect page, check I agree to the license terms and privacy notice and click Continue.On the Express Settings page, click Customize. On the Install required components page, review the information, select any optional configuration that you require, although it’s okay to leave these unselected, and click Install.On the User sign-in page, select Federation with AD FS.Click Next.On the Connect to Azure AD page, enter your global admin Azure AD credentials when prompted.Username: admin@litware369.Password: Pass@word1!?Click Next.On the Connect your directories page, select your local active directory and enter AD credentials.Username: LIWARE369\AzureAdminPassword: Pass@word1!?Click Add Directory.Click Next.On the Azure AD sign-in configuration page, leave USER PRINCIPAL NAME as is, i.e. userPrincipalName selected, and click Next.On the Domain and OU filtering page, leave Sync all domains and OUs selected, and click Next.On the Uniquely identifying your users page, leave Users are represented only once across all directories selected, leave SOURCE ANCHOR as is, i.e. objectGUID selected, and click Next.On the Filter users and devices page, leave Synchronize all users and devices selected, and then click Next.On the Optional features page, select any additional features that you need, although it’s okay to leave these unselected, and then click Next.On the AD FS Farm page, select Use an existing Windows Server 2012 R2 AD FS Farm.In SERVER NAME, type "ADFS1", and then click Next.On the Domain Administrator credentials page, type "LITWARE369\AzureAdmin" in USERNAME, "Pass@word1!?" in PASSWORD, and click Next.On the Domain Administrator credentials page, select in DOMAIN.Click Next.On the Ready to configure page, leave checked Start the synchronization process as soon as the configuration completes for starting the synchronization process.NoteYou may assume the synchronization process will automatically start at a later time if the check mark is removed. This is not correct as you will need to enable the task in Scheduled Tasks on the server where the synchronization tool is installed. After the task is enabled, synchronization occurs every 30 minutes by default.Click Install. When installation completes, verify the installation and then exit.NoteLogs regarding the Azure AD Connect installation can be found in the %LocalAppData%\AADCONNECT folder. Click Next.Click Verify.Click Exit.Configuring additional tasksYou may wish to add scale or refine your options right away, or after some time has passed. To configure additional task, proceed with the following steps:Whilst still being connected on the DC1 computer, launch the wizard again using the Start page or the desktop icon called Azure AD Connect. Click Configure. The Optional features page lists the tasks that are relevant to your configuration. Select the relevant task to your configuration you’d like to conduct, click Next, and follow the instructions. Once completed, click Exit.Let’s see how to verify the synchronization on the Azure AD/Office 365 tenant.Verifying the synchronization on the Azure AD/Office 365 tenantTo verify the synchronization on the Azure AD tenant, proceed with the following steps:Open a browsing session and navigate to the Azure portal at in with your administrative credentials to your Azure subscription.On the left pane of the Azure management portal, click Azure Active Directory. A Litware369 blade opens up.NoteIf Azure Active Directory is not listed, click More Services, type "Azure", and the select Azure Active Directory.In the Quick tasks tile, click Find a user. A Users and groups – All Users blade opens up. Confirm that both Janet Schorr and Robert Hatley are listed.Verifying the single sign-on with the Azure AD/Office 365 tenantTo verify the single sign-on with the Azure AD/Office 365 tenant (e.g. litware369.), proceed with the following steps:Open a browsing session from your external local computer and navigate to the Office 365 portal at janets@ and press ENTER. This triggers a home realm discovery (HRD) process for federated identities to see if the domain part of the username is federated.Note If you turn on HTTP tracing on IE or observe the traffic via a tool like the Telerik Fiddler HTTP trace application, you can see that the login. URL is calling GetUserRealm as part of the home realm discovery (HRD) process. You will also notice that their results show the AD FS endpoint information.If single sign-on is correctly set up, you should be automatically redirected to the AD FS farm, and then redirected back to the Office portal where you’re first invited to provide additional information.At the end of the process, you should have a seamless access to the signed in user settings in the Office 365 portal.No tiles are displayed for the online apps. This is expected for the test user as in fact you have not assigned a license to the test user.You are now in a position to further test the environment. Monitoring your on-premises deployment (Optional)This last section of this document provides and introduction to Azure Active Directory Connect Health (Azure AD Connect Health). This cloud based service in the new Azure Portal helps you monitor and gain insight into health, performance and login activity of your on-premises identity infrastructure. It thus offers you the ability to view alerts, performance, usage patterns, configuration settings, enables you to maintain a reliable Azure AD connection, and much more. Azure AD Connect Health represents a key part of our effort to help you monitor and secure your cloud and on-premises identity infrastructure.NoteFor more information, see article Monitor your on-premises identity infrastructure and synchronization services in the cloud.NoteAzure AD Connect Health is a feature of the Azure AD Premium P1 edition. For a description of this edition below and a comparison table, see article Azure Active Directory editions. This section walks you through the process of configuring this service for your existing on-premises deployment as per this document. The process consists in the following five steps: REF _Ref421634687 \h Getting started with the Azure AD Connect Health service. REF _Ref471375932 \h Configuring Azure AD Connect Health for Sync.The following subsections describe in the context of our test lab environment each of these steps.Like before, and unless noticed otherwise, all the instructions should be done on the DC1 computer.Getting started with the Azure AD Connect Health serviceTo get started with and use the Azure AD Connect Health service, proceed with the following tasks:Open a browsing session for your external personal computer and navigate to the Azure portal at . Sign in when prompted with your Azure AD/Office 365 Enterprise global administrator account such as:Username: admin@litware369.Password: Pass@word1!?Click Next.Click the Marketplace tile, and then select Security + Identity, or search for it by typing “Identity”.Under recommended, click Azure AD Connect Health. An introductory blade opens up.Click Create. This will open another blade with your directory information.Click Create. NoteIf you do not have an Azure Active Directory Premium P1 license, you will need one to use Azure AD Connect Health as previously noticed. See article What is Microsoft Azure Active Directory licensing?. You can sign-up for a trial at created, you can now access the Azure AD Connect Health Portal that allows you to view alerts, performance monitoring, and usage analytics. Upon first accessing Azure AD Connect Health, a first blade is presented.In order to see any data in your instance of Azure AD Connect Health, you will need to install the Azure AD Connect Health agents on your targeted servers, for example the six computers in our configuration. This is the purpose of the next sections.Configuring Azure AD Connect Health for SyncThe Azure AD Connect Health agent for Sync is installed as part of the Azure AD Connect installation (version 1.0.9125.0 or higher). So this is already completed with our prior installation and configuration of Azure AD Connect (version 1.1.380.0 in our configuration). See section § REF _Ref421213239 \h \* MERGEFORMAT Integrating your on-premises AD forest(s) with your Azure AD/Office 365 tenant. To verify the agent has been installed, look for the following services on the DC1 computer. If you completed the configuration, they should already be running:Azure AD Connect Health Sync Insights Service.Azure AD Connect Health Sync Monitoring Service.NoteFor more information, see article Azure AD Connect Health Agent Installation.NoteFor more information on the various health topics (alerts, performance monitoring, usage analytics, properties, etc.), see articles Azure AD Connect Health Operations, and Using Azure AD Connect Health for sync.This concludes the forth part of the whitepaper.The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.This white paper is for informational purposes only. Microsoft makes no warranties, express or implied, in this plying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in, or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.? 2017 Microsoft Corporation. All rights reserved.The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. Microsoft, list Microsoft trademarks used in your white paper alphabetically are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.The names of actual companies and products mentioned herein may be the trademarks of their respective owners. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download