Category Archives: AAD Connect

Guidelines for Office 365 User Provisioning and De-provisioning Processes – The Lost Documentation

BACKGROUND AND PURPOSE

Introducing Office 365 and Azure AD in an Enterprise environment always raises the question around how object provisioning-, de-provisioning- and organizational change-processes will be affected. These are three common concerns and questions that I get from Enterprise customers in the planning phase of an Office 365 onboarding project:

  1. The customer is using an identity management (IDM/IAM) solution for provisioning accounts, and want’s to better understand how Office 365 / Azure AD will affect that landscape.
  2. The customer have special de-provisioning routines for retaining user data (i.e. keeping the mailbox and home folder data etc.), and needs to know how these processes should be updated when Office 365 is introduced.
  3. The customer understands the provisioning and de-provisioning processes, but want’s to automate them as much as possible.

The purpose of this article is to provide guidelines on how to approach this topic. Please note that these guidelines are intended for large Enterprises that seeks a high level of automation in these processes. Small-/medium-sized organizations with a lower number of employee attrition and/or organizational changes per week/month does not always have to implement automation processes for provisioning/de-provisioning/org changes.

As always with the “Lost Documentation” articles, most of this information is available from Microsoft, scattered over various TechNet- and MSDN-articles – this is my attempt to assemble the information in one place, to assist fellow Solution Architects, system administrators and project managers in the journey to Office 365.

PROVISIONING A USER FOR OFFICE 365 – WHAT COULD POSSIBLY GO WRONG?

Implementing user provisioning processes in Office 365 is generally very easy and straight-forward. Many often think that if you have complex provisioning processes in place today, you will have a hard time make it work for Azure AD / Office 365. This is almost never the truth, as the provisioning processes for Azure AD / Office 365 is “put on top” of what you already have. You kan keep provisioning users based on data from your HR system, and assign them roles based on data in a payroll system, or whatever it is that you are doing – as long as the user is created in Active Directory – it will be provisioned in Azure AD / Office 365 through a separate appliance-like synchronization engine (AAD Connect) without you having to change anything in the current provisioning routines. However, some processes will require updates – i.e mailbox provisioning in Exchange – and you will also be required to assign an Office 365 license to your users before they can use any of the services. The higher ambition you have for automation around these processes, the more challenging this topic will be for you – simply because automation is handled differently by every customer so there is no general answer to how it is achieved.

Below is guidelines for approaching provisioning automation, which can help you update your own routines and processes.

GUIDELINE #1: KNOW YOUR USER PROFILES BETTER THAN EVER BEFORE

The nature of SaaS: Office 365 is a subscription-based service, sold and consumed in a SaaS-model. Each user has assigned services in Microsoft’s data-center, with associated SLAs. A fundamental aspect of this delivery model is that each user must have an assigned license to be able to consume the service. A challenge for large Enterprise customers is that they are used to the traditional ways of purchasing Microsoft licenses (not services), which required a yearly inventory (“true-up”) of how many users were having Office applications, Exchange mailboxes, Skype for Business/Lync profiles, access to SharePoint etc. – and all you had to do as a customer was to share this updated figure with Microsoft – pay accordingly – and continue to use the services.

There have never before been any “enforcement method” that makes Office, Exchange, Skype for Business or SharePoint stop working if you are using more licenses that you have accounted for in your “true-up” – everything has just worked and it has been very much up to your own customer loyalty to make sure that you actually have payed for every user that you have provided with Microsoft software – such as Exchange mailboxes, Office applications, Skype for Business/Lync profiles and access to SharePoint Sites. And of course, this would include all your employees, but also any external user, like consultants getting Exchange mailboxes so that they could send and receive e-mail with your domain.

Don’t under-estimate the task: With Office 365 in place, the reality is changed. Users that are not assigned a license does not get access to any services (can’t activate the Office applications, no mailbox access in Exchange Online, no OneDrive for Business, no access to SharePoint Sites etc.). There is no “grace period” – you will need to have the right number of licenses reserved from your Enterprise Agreement through the VLSC Portal, and these licenses need to be assigned to a user (activated on that user’s account – read more later in this article) in order for that user to be able to use the services. This fact will require you to both know exactly how many users you are providing with Office 365 services, and if you are providing more than one license plan (SKU), i.e you have purchased a mix of E1, E3, E5 and K plans – you will need to know exactly what individuals should be mapped to exactly what license plan.

The task of mapping each user to a user profile (license SKU) is often extremely under-estimated. It is important to understand the consequences of not having the user profile mapping completed before commencing the Office 365 onboarding project. The consequence includes:

  1. The onboarding project will be stalled, as licenses will either run out, or the technical team doing the onboarding will at a certain point in time need to know what licenses to assign for each user, as all users are onboarded.
  2. The business case for moving to Office 365 will be impacted. Let’s say you invested in 50 000 E3 licenses, because that was the amount of Office ProPlus licenses you bought in the traditional license model. As it then turns out, you were actually providing these services for 55 000 users, you just had not calculated for all the external people who you have provided with IT-tools. This would mean an additional cost of 10% over your initial Office 365 investment.
  3. Users would get insufficient or wrong services assigned. Imagine if you assign E1 licenses to a department of 5000 users where you deploy Office 365 ProPlus – no one would be able to activate their Office applications, and your support organization would have to take the hit. Another consequence of getting the wrong services assigned is that you pay an extreme over-price for a user getting more services than he or she ever would actually use.

So before you dig deeper into the technology around provisioning, it is recommended that you map each and every user account in your organization to a user profile, which also translates to a license SKU.

Clean-up: Also note that accounts (i.e. Active Directory users with or without Exchange mailboxes) that are not actively used cannot be provisioned without an active license, which means that if you have licenses for 50 000 users, but you have 60 000 mailboxes in Exchange, where 5000 are Shared Mailboxes and Equipment/Room Mailboxes (these are free in Office 365 / Exchange Online), you have an overhead of 5000 user mailboxes which will need to either be removed or to acquire a license. Cleaning up your Active Directory and Exchange Server from inactive user objects and mailboxes before Office 365 onboarding is as important as the user profiling work itself.

GUIDELINE #2: UNDERSTAND IDENTITY/USER PROVISIONING AND LICENSING

Identity Bridge: The recommended way for Enterprise customers to provision users, groups and contact objects in Azure AD / Office 365 is by extending your on-premises Active Directory to the cloud through an appliance-like synchronization tool called Azure AD Connect (AAD Connect). The tool was previously known as DirSync and AADSync, and there was also a standalone FIM / MIM Management Agent – all these three still works, but future development will only be done in AAD Connect, which makes that the best choice for every organization today, regardless of complexity and identity landscape in general. Hand-in-hand with identity synchronization for provisioning and administration, a security token service (like ADFS) is usually implemented to provide single sign-on to Office 365 – this however has actually nothing to do with provisioning, why it will not be mentioned more in the article.

Sync: With AAD Connect in place, the on-premises Active Directory will be replicated to the Azure AD / Office 365 every 30 minutes. All your users, groups and contact objects will be provisioned in Azure AD / Office 365, but no Office 365 services are assigned to any users until you assign a licenses yourself as an admin. AAD Connect makes sure that you keep administrating your identities the same way you are today, and that you won’t have to maintain multiple identities (on the ground and in the cloud). It also makes sure that what ever identity provisioning routines you have in place today will continue to work as before, as long as they provision identities in Active Directory, AAD Connect will do the rest on top of what you already have.

Beware of 3rd-party or self-made sync: It is not recommended to replace AAD Connect with a 3rd party or self-developed synchronization / provisioning script (i.e. PowerShell / REST API provisioning). The main reason is that it will not be supported for all complex scenarios (such as Exchange Hybrid Configuration, attribute write-back scenarios, etc.). There is a AAD Federation Compatibility List (previously known as the “Works With Office 365 Identity Program”) that lists 3rd party STS services compatibility towards federation with Azure AD / Office 365 – found here – however, not many are reading the top note on the page that says that the solutions listed are only tested for federation scenarios – synchronization and multi-factor authentication scenarios provided by 3rd party vendors are not supported by Microsoft.

Synced users needs licenses: When AAD Connect is in place and is replicating your Active Directory data to Azure AD / Office 365, you will need to license users in order to activate them for Office 365 service – such as being able to active Office 365 ProPlus or read content from SharePoint Online. Assigning licenses can be done manually via the Office 365 Admin Portal, but if you want to automate this for Office 365 licenses, you have to create your own solution as of now. The recommendation is to implement a PowerShell-script that assigns licenses based on Active Directory attributes or Security Group membership. This script can run as a Scheduled Task, for example on the same server that hosts AAD Connect. A good place to look if you want to automate user licensing with PowerShell is at this post by Office 365 MVP Johan Dahlbom (and in this post he explains how to do it with Azure Automation).

Two things before you sync: It is recommended that you inspect your Active Directory for directory quality errors before you automate your identity provisioning and administration with AAD Connect. Use the IdFix tool to run the inspection and then remediate all errors found. It is also recommended that you change your users UPN-names to match their primary SMTP-addresses before you sync. You don’t have to change the samAccountName, so users can keep logging in to Windows etc. the same way as before. The main reason to why you should change UPN-names to match SMTP-addresses is that users should know what username to use when accessing Office 365 in the mobile context (it has to be in the UPN-format). If you have contemplated Alternate Login ID as the solution for this, beware of the limitations (great article here by Joe Palarchio) – I generally do not recommend using it.

GUIDELINE #3: UNDERSTAND MAILBOX PROVISIONING – DURING AND AFTER COEXISTENCE

With our user profiling, AD/Exchange clean-up, identity bridge and automated licensing in place, we are ready to look at process updates required for provisioning Exchange mailboxes.

Different ways depending on if you do hybrid or not: If you have established an Exchange Hybrid Configuration, you will provision mailboxes as an administrative task much like you have done before, until the last Exchange Server and the hybrid configuration is fully decommissioned. If you are not in a hybrid configuration, you will provision mailboxes simply by assigning a license for Exchange Online to one of your users. Let’s break down the rationales and guidelines:

As long as you are in an Exchange Hybrid Configuration with at least one Exchange Server still running on-premises, you can provision new mailboxes directly in Exchange Online by creating new “Remote Mailboxes”. A Remote Mailbox is a mailbox in Exchange Online that you can see and manage from your Exchange Server administration tools. You can of course create Remote Mailboxes from your Exchange administration tools (GUI), but for automation purposes it is recommended to use PowerShell. For updating your mailbox provisioning routines to create remote mailboxes in Exchange Online while you still have Exchange Server on-premises, study and use the PowerShell cmdlets for provisioning new Remote Mailboxes. Here are some examples:

To create a new Remote Mailbox for an Active Directory Mail User that you have provisioned on-premises, synced to Azure AD and assigned an Office 365 license (the most common scenario), run the following command in the Exchange Management Shell:

Enable-RemoteMailbox -Identity <UPN-name> -RemoteRoutingAddress <USERALIAS>@<TENANTNAME>.mail.onmicrosoft.com

To create a new user in the on-premises AD and a new Remote Mailbox that will be enabled when the new user is synced by AAD Connect (a fairly common scenario), run the following command in the Exchange Management Shell, and then license the user:

New-RemoteMailbox -UserPrincipalName user@domain.com -Name “Display Name” -OnPremisesOrganizationalUnit OU=Users,DC=addsdomain,DC=com -Password (ConvertTo-SecureString -AsPlainText “Pa$$word” -Force)

To create a new Shared Mailbox directly in Azure AD / Exchange Online as a Cloud ID (without any corresponding AD-user on-premises), run the following command in PowerShell, after connecting to Exchange Online:

New-Mailbox -Shared -Name <UPN-name> -PrimarySmtpAddress <User>@<DOMAIN>.com

(If you want the Shared-/Room-/Equipment Mailboxes to be represented in the on-premises AD, you will need to provision them as User Mailboxes first and convert them to shared mailboxes afterwards and remove the licenses – Shared-/Room-/Equipment mailboxes does not require a license once they are provisioned as such).

If you are not in an Exchange Hybrid Configuration, you provision mailboxes simply by assigning users with the correct attributes and an Office 365 license (that includes Exchange Online). The attributes that must be populated before you sync and license the users are: proxyAddresses (should include all necessary SMTP- and SIP-addresses), mail (should be populated with the primary SMTP-address), UPN (should preferably match the primary SMTP-address), Display Name (as you want it to appear in the Global Address List). The same process goes for Distribution Groups – you provision them in the on-premises AD with these attributes (minus UPN) populated, and then let AAD Connect synchronize them to Azure AD / Exchange Online.

About administration of Exchange Online: When AD synchronization with AAD Connect is enabled, most attributes are owned by AD on-premises, and you will therefore not be able to fully administer Exchange Online from the web-based administration portal (Exchange Control Panel). Some Exchange-attributes (such as proxyAddresses) simply must be administered in the on-premises AD and be synchronized to Azure AD / Exchange Online for the change to have effect. Because of this, it is worth noting that if you are decommission all Exchange Servers on-premises, you might need to build in more Exchange administration to your IDM / IAM provisioning and self-service tools than what you had before. End-users that administer Distribution Groups in Outlook are also affected, as this will for the same reasons stop working after the users mailbox is moved to Exchange Online – self-service tools for Distribution Group/List management will be required.

GUIDELINE #4: UNDERSTAND SKYPE FOR BUSINESS (LYNC) ONLINE PROVISIONING

Skype for Business Online (formerly known as Lync Online) provisioning works in the following way:

  1. If you have Lync Server or Skype for Business Server on-premises, and have users provisioned there with active SIP-profiles, and you are using AAD Connect so sync your AD on-premises to Azure AD / Office 365, no provisioning will occur in Office 365 for the SIP-enabled users, regardless if you license these users for Skype for Business Online in Office 365.
  2. If you license SIP-enabled users for Skype for Business Online, and then remove the SIP-profile from Lync-/Skype for Business Server on-premises, users will be provisioned for Skype for Business Online at the next AAD Connect sync cycle (often referred to as a “cut-over move”).
  3. If you are leveraging a Lync-/Skype for Business hybrid configuration, users must be licensed for Skype for Business Online, and you can then move users from the on-premises pool to the online pool. When all users are moved, you can for the purpose of provisioning decide to keep or remove the on-premises Lync-/Skype for Business Server environment, and select another provisioning method from this list of guidelines.
  4. If you are not having Lync-/Skype for Business Server on-premises, you provision users for Skype for Business Online simply by assigning them an Office 365 license (with Skype for Business Online included). It is recommended that you in this case populate the proxyAddresses attribute in the on-premises AD with a SIP:-address that matches the primary SMTP address.

GUIDELINE #5: UPDATE YOUR PROCESSES FOR DE-PROVISIONING USERS

There are many different aspects of user de-provisioning, including return of licenses, removing permissions, store/hold user data, etc. By understanding the fundamentals of how Azure AD / Office 365 de-provisioning works, you will be able to update your current processes to work with Office 365. Here are the fundamentals you should know about:

  1. If you are disabling a user in the on-premises AD, you are disabling the user in Azure AD / Office 365, but the license is still active.
  2. If you are deleting a user from the on-premises AD, you are deleting the user in Azure AD / Office 365. When this happens, all data is soft-deleted for 30 days and the license is returned to the license pool. If you restore the user within these 30 days (restore the user in the on-premises AD and sync the user again), all data will be kept. If you don’t restore the user within 30 days, and have not applied any rules for data Hold, the data is lost.
  3. If you remove the license from a user in Office 365 (for example if you move the user to a OU for de-provisioned users, disable the account and strip it from it’s group memberships as your de-commissioning routine in the on-premises AD), all data is soft-deleted for 30 days. If you re-assign the license to the user within the 30 days, and have not applied any rules for data Hold, all data will be kept. If you don’t re-assign the license within 30 days, the data is lost.
  4. If the user is licensed when it is deleted and the Manager field is populated for that user in AD, the Manager will be notified and given access to the users OneDrive for Business site for 30 days through the Access Delegation mechanism, explained here. If you remove the license before actually deleting the user, the Access Delegation process will not be triggered.
  5. There are different ways to keep the data for more than 30 days after you have removed the license from a user. The general recommendation is to use the Hold capabilities, administered from the Office 365 Protection Center.

GUIDELINE #6: UPDATE YOUR PROCESSES FOR ORGANIZATIONAL CHANGES

When users go through a department change, country transfer or other forms of organizational change, there are often identity-related processes that goes with it. In Azure AD / Office 365, it is much like with the provisioning; you can keep doing what you did before and let AAD Connect handle all the provisioning aspects in Azure AD / Office 365 for you. There is however one concern regarding the UPN attribute that you should be aware of. Here are the fundamental guidelines for organizational changes:

  1. If the organizational change is resulting in attribute updates, or even changes of Organizational Units, in the on-premises AD – let AD Connect take care of updating this in Azure AD / Office 365 for you through the regular synchronization cycle.
  2. Beware of delays that can occur, such as generation of the Offline Address book used in Outlook that can make updates in the Global Address List need a day to show up to all users, or back-end replication to SharePoint Online to let all organizational attributes show the correct values.
  3. If the organizational change requires a change of the UPN-name and the user is licensed, you will need to manually give it a push in Azure AD in order for it to change, AAD Connect can not change UPN-names in Azure AD / Office 365 for licensed users. To manually fix the UPN-name for the licensed user, follow the steps outlined in Scenario 2 in this article. A summary of the steps: change the UPN-name in the on-premises AD, let AAD Connect run a sync cycle, then connect PowerShell to your Azure AD tenant and run this command in PowerShell:

Set-MsolUserPrincipalName -UserPrincipalName [CurrentUPN] -NewUserPrincipalName [NewUPN]

SUMMARY AND DISCLAIMER

All guidelines presented here are based on my field experience and are made available for your own interpretation to assist in updating provisioning/de-provisioning routines in the move to Office 365. I hope you will benefit from these guidelines, and that you will give me suggestions for more topics that would make this article more complete. I am always listening to feedback on Twitter. Thank you for reading.

Hands on with AADSync (RTM) / AAD Connect – a Guide to Multi-Forest AD Synchronization and Attribute Filtering

ARTICLE UPDATED JUNE 2015 TO INCLUDE AAD CONNECT (NEW NAME, VERSION AND BUNDLING FOR AADSYNC).

INTRODUCTION

Office 365 is in many aspects best compatible with an on-premise infrastructure where the customer have followed Microsoft’s guidelines and best practices for design and configuration. A perfect example of such guideline is to keep all Active Directory user data associated with employees (personal user objects) within a single Active Directory forest. For many organizations, this is not the reality, often due to a background of growth by acquisitions where the acquired organisation remain their Active Directory data in their own forest that they always have been using. Such landscape is referred to as a “Multi-forest scenario” (one organization with users are spread across many Active Directory forests).

The aspect that makes the multi-forest scenario problematic is the user provisioning and administration. For single-forest customers (the number of domains within the forest does not matter), it have always been easy to deploy Directory Synchronization from your Windows Server AD forest to Azure AD by using DirSync – but that method have not been supporting the multi-forest scenario (DirSync supports single-forest synchronization only). Different alternatives have since the launch of Office 365 become available to address directory synchronization in the Multi-forest scenario (like the FIM AAD Connector), and there are still different ways to go at it – but now, better native support for this scenario is becoming a reality with the new Azure Active Directory Connect (AAD Connect) that previously was available as AAD Sync (AAD Connect is the new name, version and bundling for AAD Sync). This article will provide an overview of the alternative methods, and a detailed step-by-step guide on how to configure multi-forest synchronization from two separate Active Directory forests to one single Azure AD/Office 365 tenant. We will also look in to the feature of Attribute Filtering within AAD Connect to demonstrate how selected AD attributes can be skipped in the synchronization (please note that filtering out attributes is now possible but not generally recommended, I will explain why later in the article).

MASTERING THE MULTI-FOREST SCENARIO – OPTIONS OVERVIEW (OR “READ THIS FIRST”)

If you are considering Office 365 (or other AAD integrated applications) and multiple Active Directory forests is your reality, consider the options below. Option D will later in the article be explained in detail. There is no preferred order or priority for the given options.

OPTION A – CONSOLIDATE THE FORESTS FIRST: If Active Directory consolidation (merging the forests in to one) is an option, that activity could be completed prior to adopting Azure AD/Office 365 to avoid the multi-forest scenario complexity. The objects that needs to be consolidated to one forest are the user objects for the employees and groups that relate to any of the Office 365 services (i.e distribution lists and mailbox security groups). Computer objects and service accounts etc can still remain in the trusted forest when activating AAD/Office 365 services.

OPTION B – MIX SYNCED IDs WITH CLOUD IDs: If the majority of users resides in one AD forest, and a limited number of users are in a separate forests, a good option can be to implement AD integration (AADSync, ADFS) to the primary forest, but create Cloud ID (separate identities in Azure AD) for the users that are in the separate forests. This creates a mix of integrated and separate identities in the same tenant. If you are using ADFS in the primary forest, keep in mind that users in the other forests (that get’s the Cloud IDs) can not have the same domain in their username, because federation is activated per domain (if domain1.com is activated for federation, domain1.com users can not use Cloud IDs with user@domain1.com usernames, they would have to use another domain for their usernames).

OPTION C – USE SHADOW ACCOUNTS: This option is similar to Option B, but with the ability to centrally manage all identities. Instead of creating Cloud IDs for the users residing in the separate forest(s), create corresponding user objects (“shadow accounts”) in the primary AD forest for those users instead, and let AAD Connect provision these accounts in AAD/Office 365. These “shadow accounts” allows the users in the separate forest(s) to login with a centrally managed account, but they will not have Single Sign-on with ADFS as they are not logging in to Windows with the same account as they are using for AAD/Office 365. This option allows ADFS Claim rules, centrally managed password policies and other benefits that comes with proper Active Directory integration – but have considerations regarding end-user experience for the shadow users (there is a separate password associated with the shadow account, etc).

OPTION D – SYNCHRONIZE ALL FORESTS WITH AAD CONNECT: The final option is to actually enable multi-forest synchronization. This can be accomplished either by using the AAD Connector in FIM that still is available (but should not be used as it will not be developed further), or by using AAD Connect. It is recommended to use AAD Connect, as the FIM agent (as well as DirSync) is believed to be deprecated over time and replaced with AADSync completely. AAD Connect works like DirSync always have, but have native support for connecting with multiple Active Directory forests. How to implement and configure this option is explained in detail below.

IMPLEMENTING MULTI-FOREST SYNC WITH AAD CONNECT – SCENARIO OVERVIEW

I will now explain how to configure multi-forest synchronization step by step by step. The screen shots are collected from AADSync, but from June 25 2015, you should downlad and use AAD Connect to configure multi-forest – the wizard in the screenshots matches the one in AAD Connect for the AAD Sync steps. Before jumping in to configuration, let’s have a look at the given scenario.

SOURCE: Two separate AD Forests containing users – FOREST-A.int and FOREST-B.int
TARGET: One Azure AD/Office 365 tenant.
METHOD: We will configure AAD Connect (AAD Sync used in the screen shots) to synchronize objects from both forests to the tenant. We will also configure AADSync to filter out the ipPhone, homePhone and extensionAttribute9 AD attributes from the synchronization.

Overview. Users from FOREST-A and FOREST-B will be syncrhonized to Azure AD.

Overview of users in FOREST-A

Overview of users in FOREST-A

Overview of users in FOREST-B.

Overview of users in FOREST-B.

CONFIGURING MULTI-FOREST DIRECTORY SYNCHRONIZATION STEP-BY-STEP

Pre-requisites:

  1. You have an AAD/Office 365 tenant
  2. You have activated all your smtp-domains that are used in the organization (both forests) in your tenant.
  3. Your users have either or both their UPN-name and mail-attribute in Active Directory populated to match their primary smtp-address.
  4. You have one machine available to install AADSync (can be joined to any of the forests). The machine can access domain controllers in both forests and is able to resolve both forest DNS names.
  5. You have user account credentials to read both AD Forests, and you have a Global Administrator account to write to your Azure AD.
  6. The total number of objects that you will syncrhonize is not more than 100 000 (would require a full SQL setup which is not covered in this guide). The limit for full SQL setup was 50 000 in DirSync, but is now lifted to 100 000 for AAD Connect.

Make sure you meet all pre-requisites above. Then, let’s get started.

  1. The first step is to activate Active Directory Synchronization in your tenant. Do so by logging in to the admin portal, browse to users and follow the link at the top for setting up AD Synchronization.

    1activatedirsync

    Navigate to Users in your admin portal and follow the highlighted link to set up AD Synchronization. Notice in the screenshot that there are only two users (Cloud IDs) present in the tenant as of now.

  2. Click Activate to enable AD Synchronization in your tenant.
    2activatedirsync
  3. Download AAD Connect to the server where you want to install the tool. Get it here.
  4. Launch the installer executable (MicrosoftAzureADConnectionTool.exe).
    5launch_aads
  5. The installer let’s you choose the installation path and accept license terms. Click Install to continue.
    6wizard_Start
  6. The necessary components are now installed to the server (Sign-in Assistant, SQL LocalDB, SQL Native Client, the actual Sync Service etc). After the component installation, the wizard interface may disappear completely for about 30 seconds, but it will come back when it have finished loading the configuration wizard.
  7. The first step in the configuration wizard is to connect to your Azure AD. Enter the credentials for a Global Administrator in the tenant and hit Next to continue.
    7wizard1
  8. Next, enter credentials for the first forest you want to synchronize. Start by adding the forest to which you have joined the AADSync server (in this case this is FOREST-A). Hit Add Forest to verify the connectivity and credentials, and to add the next forest.
    8wizard2
  9. Add the next forest. Notice that I use the forest FQDN to specify the domain in the Username field (FOREST-B.int\jesper). I recommend this when adding the external forests to avoid an error that states “The specified domain does not exist or cannot be contacted.”, which may occur if only using the NetBIOS name (FOREST-B\jesper).
    9wizard3
  10. When both forests are added to the list, hit Next to continue.
    10wizard4
  11. The next option screen in the wizard covers settings for user matching. These options require careful consideration if you are using GAL Sync (or for any other reason have users represented as User and/or Contact objects in both forests) and/or are planning for a future Active Directory consolidation/migration of the forests that you currently are configuring for AADSync. Read the following rationales for these options before proceeding:


    Matching across forests: If your user objects only occurs in their respective forest, and are not replicated as a contact object or duplicate account in the other forest, leave the “Matching across forests” option at its default – “Your users are only represented once across all forests”. If objects are represented in many forests, you must make a selection for an attributed that can be used as a matching attribute to merge/join the duplicates to one Azure AD identity, or you will have collisions during the synchronization. More information is available if you follow the “Learn more about user matching” link in the wizard.

    Matching with Azure AD
    : These two options are used for identity federation. The sourceAnchor attribute is the immutable ID for the user, and must not be changed during the lifetime of a user object. The default choise – objectGUID – is a good choise IF YOU ARE NOT PLANNING AN ACTIVE DIRECTORY CONSOLIDATION OR MIGRATION IN THE FUTURE. The objectGUID attribute will change if the user is moved to another forest, and would in that case create a duplicate user in Azure AD (and a big mess to clean up). Use the objectGUID if you are certain that the affected user objects will remain in their current forest for their remaining lifetime. The userPrincipalName attribute is the attribute that will populate the Username in Azure AD (the corresponding UPN-name in AAD). Having users signing in to AAD/Office 365 with their primary smtp-address as their username is a best practice, so use the default – userPrincipalName – if attribute is matching the users smtp (email) addresses (or if you are planning them to do so). If your UPN names do not match the primary smtp-address and you are not planning on changing the UPNs to do so, consider using the mail-attribute instead (in that case, just remember to configure ADFS to use the same attribute by following these instructions).


    In summary: If your users are represented once across the forests (no GAL Sync or equal in place) and if your UPN-names are matching primary smtp-addresses, you can go ahead with the default options here, like I do in this example. Make your selection and hit Next to continue.
    11wizard5
  12. Next up are Optional features. At the time taking this screenshot, Password Synchronization was not available in AADSync (RTM version, build 1.0.0419.0911), but this is available now (from October 2014). Password write-back is also in its final stages of development and will soon be available to customers that have an Azure AD Premium subscription (not included in Office 365). The Exchange Hybrid option must be selected if you are planning to set up an Exchange Hybrid Configuration between one of your on-premise Exchange organizations and Exchange Online (multi-org Exchange hybrid is now supported, but was not from the beginning). I am selecting Exchange hybrid deployment and Azure AD app and attribute filtering to demonstrate the new capabilities to filter out attributes from AADSync. Please note that I do not recommend that you use app and attribute filtering (see explanation below under “Should I filter out apps…”), I am making the selection in this example to demonstrate the capability. Make your selection and hit Next to continue.
    11wizard6
  13. If you selected the “Azure AD app and attribute filtering” in the previous step (not generally recommended), you will now have the option to filter out Azure AD apps (Office 365 services etc). Filtering out apps and attributes is possible, but before you decide doing so, please read the following rationale:
    Should I filter out apps and/or attributes from the synchronization? My general answer to this question is “No”. There are in my opinion three main reasons why you shouldn’t.REASON A – NO SECRETS IN ACTIVE DIRECTORY: By default, all users can read all attributes (not the passwords) for all objects in Active Directory. If you want to filter out attributes because you have secret data stored in AD attributes, you are doing things very wrong. Any user can open any AD or LDAP administration tool (like Active Directory Users and Computers) and read and/or export all your directory data from any machine in the network. If you are allowing shared AD accounts (like POS/kiosk accounts), you will not have any chance to log or trace such export either. You should not store any secret data in Active Directory attributes (another Microsoft Best Practice), and therefore synchronizing attributes to AAD that any user can read anyway should not be imposing a security threat to your organization.     
    REASON B – KEEP IT SIMPLE, IT IS YOUR PRIVATE DATA: If you filter out apps/attributes in your synchronization, you are immediately configuring a “special setup” with a complexity parameter added to it. Your tenant and your Azure AD is your private data. You are not sharing it with Microsoft or anyone else. Keep your AAD synchronization solution as simple as possible, trust Office 365, and synchronize all attributes as recommended to avoid incompatibility (surprises) in the future as AAD/Office 365 develops.     
    REASON C – FUNCTIONALITY AND RICH USER EXPERIENCE:
    To allow the very best end-user experience, GlobalAddress Lists, Lync Contact Cards, SharePoint profile sites etc should all be populated with as much information possible. If you decide to filter out attributes, you will take away functionality and “rich content” from your end users. It is also worth mentioning that Microsoft services, such as Exchange and Lync, depend on Active Directory attributes for their functionality – so filtering out an attribute that is not technically needed today might cause an upcoming feature not to work in your environment in the future. In this example, we are filtering out three attributes, but we will leave attribute scopes for all apps intact in this option screen. Make your selection and hit Next to continue.
    12wizard7
  14. As we selected to use “Azure AD app and attribute filtering” previously, we now get the chance to filter out specific attributes (the previous options screen for apps let us filter out sets of attributes based on specific apps/services). To demonstrate the attribute filtering capability, I am here filtering out the ipPhone, homePhone and extensionAttribute9 attributes from synchronization because we don’t want them to be visible in the Exchange Online Global Address List. I make the selection by first checking the “I want to further limit…” check box and then clearing the attributes from the list. Make your selection and hit Next to continue.
    13wizard8
  15. Next is a summary of your AADSync configuration. Check to see that everything looks OK and hit Configure to continue.
    14wizard9
  16. When the configuration is completed, you have the option to start the first Synchronization immediately, or to finish the wizard without starting the synchronization so that you can configure filtering before starting (if your would like to filter out specific OUs, child-domains or set an attribute based filtering). Filtering with AADSync works and is configured the same way as it always have with DirSync. Instructions on how to enable and configure filtering can be found here. In this example, we want to synchronize the complete scope of both forests, so we let the “Synchronize now” option stay selected and hit Finish to complete the wizard and start the synchronization.
    15wizard10
  17. Now, all we need to do is wait for the synchronization to complete. You can monitor the synchronization progress by opening the Synchronization Service Manager (the miisclient interface) from the Start menu. You can track the different stages of the synchronization in the Operations tab.
    16SyncServiceManager
  18. There is also another tool available with AAD Connect called the Synchronization Rules Editor (you will find it in the Start menu). This tool can be used to see and edit the attribute flows and scoping filters. You can use the tool to create transformation rules for certain attributes etc. In this example, we will not make any such changes, but we open it to have a look while we are waiting for the synchronization to complete.
    17SyncRuleEditor
  19. When the synchronization is completed, it is time to see the result. Sign in to the Office 365 admin portal and navigate to Users. Now, you will see users from both forests provisioned as synchronized identities “Status is Synchronized with Active Directory”. Success!
    18Syncedusers
  20. When opening a user from each forest, you see that both users are synchronized (get’s the banner stating they can only be edited in the local Active Directory) and that the user name matches the UPN-name in the local AD.
    19ForestAuser20ForestBuser
  21. The users can now be licensed and start using Office 365, or other AAD-integrated, services. You may also set up federated identities using ADFS and provide Single Sign-on to the users from both forests using a shared ADFS STS service with proper configuration.

SUMMARY AND DISCLAIMER

In this article we have seen how powerful and yet easy to use the new AAD Connect Service is. Multi-forest is a common and challenging reality for many enterprise customers, and with AAD Connect there is finally a robust, simple and supported way to get Active Directory synchronization working in that scenario. So thank you DirSync, AADSync, FIM AAD Connector and stand-alone AADSync for the great time together, it have been great – but now it’s time for AAD Connect to take it from here.