Setup Directory Synchronization to Office 365

This post will cover off the build of the Directory Synchronization Server. This will allow us to replicate the contents of our AD to Office 365, which will allow us to make use of the SSO features that we installed in the previous posts.

This will be the end goal architecture for setting up ADFS, ADFS Proxies and Directory Synchronization


The directory synchronization computer must meet the following requirements:

  • It must be running the right version of Windows Server. The Directory Synchronization tool can be run on the 32-bit or 64-bit versions of the following Windows Server operating systems:
  • 32-bit: Windows Server 2003 Standard or Windows Server 2008 Standard
  • 64-bit: Windows Server 2008 R2 Standard or Windows Server 2008 Standard
  • It must be joined to Active Directory. The computer must be joined to the Active Directory forest that you plan to synchronize. The computer also must be able to connect to all the other domain controllers for all the domains in your forest. A forest is one or more Active Directory domains that share the same class and attribute definitions, site and replication information, and forest-wide search capabilities.
  • It cannot be a domain controller. The Directory Synchronization tool cannot be installed on Active Directory domain controllers.
  • It must run Microsoft .NET Framework 3.x.
  • It must run Windows PowerShell
  • It must be located in an access-controlled environment. Access to the computer that is running the Directory Synchronization tool should be limited to those users who have access to your Active Directory domain controllers and other sensitive network components. Only users or administrators that have the necessary permissions to make changes to domain controllers in Active Directory should have access to this computer.
  • You can view the hardware requirements for the Directory Sync Server, here


Install and Configure Directory Sync

  1. Base build DIRSYNC01 with Windows Server 2008 R2 SP1 (Standard or Enterprise)
  2. Add the server to the local domain and assign static IP addresses from your internal network (192.168.0.x)
  3. Create a domain service account for use with Directory Sync. This account must be a member of Enterprise Administrators
  4. While logged into DIRSYNC01 the service account open the Microsoft Online Admin Portal ( and log in with a global administrator account.
  5. Create an online user service account ( for Directory Sync
  6. Grant that user Global Admin Rights
  7. You don’t have to apply a license to the user
  8. Set this users password to never expire
  9. Back on the Admin page, in the left pane, click Users.
  10. At the top of the Users page, click the link next to Active Directory synchronization.
  11. Select the correct version (either Windows 32-bit version or Windows 64-bit version) and click Download


Install Directory Sync

  1. Double click the file and launch the installer
  2. Click Next
  3. Accept the License Agreement and click Next
  4. Select the Installation Folder and Click Next
  5. The install starts – This process can take awhile
  6. Click Next to Finish the Installer
  7. On the last page of the installation program, select Start Configuration Wizard now, and then click Finish

Configure Directory Sync

NOTE: If you want to do OU filtering, read step 6 carefully


  1. From the previous step, The Microsoft Online Services Directory Synchronization Configuration Wizard starts. Click Next
  2. Enter your online Service Account ID and Password for Directory Sync, Click Next
  3. Enter your domain Service Account ID and Password for Directory Sync, Click Next
  4. If the installer detects that you have Exchange 2010 in the domain, you will get this option. If you don’t have it installed, then the option the greyed out. Enable and Click Next, or just Click Next if it’s greyed out.
  5. Click Next to Finish the Installer
  6. Click Finish to start the first Synchronization
  7. NOTE: If you want to do OU filtering, then uncheck ‘Synchronize directories now’ and follow the steps detailed in this POST

Verify Directory Synchronization is Running

  • The easiest way to do this is to login to the Office 365 Portal and check the users. If you see the domain users you are up and running
  • You can also read the instructions below for more detailed analysis



The Complete Series of Posts


  1. Open Office 365 Account and Sign up for the E Plan Trail
  2. Add and Verify the primary SMTP domain
  3. Setting up ADFS Servers with Windows NLB
    1. Part 1
    2. Part 2
    3. Part 3
    4. Part 4


  4. Setting up ADFS Proxy Servers with Windows NLB
    1. Part 1
    2. Part 2


  5. Setup Directory Synchronization to Office 365

6.   Force AD Synchronization with Office 365

Thanks for visiting and reading my posts. I am always looking for more ideas. Please comment or email me with what you would like to see.

Kelsey Epps

Office 365 MVP

Email Me Follow me on Twitter Connect with me on LinkedIN Facebook Me

Leave a Reply