---
title: "Connect Azure AD to Office 365: Install Azure AD Connect"
description: "Discover how to connect Azure AD to Office 365, install Azure AD Connect, and enable directory synchronization for your tenancy."
canonical: "https://adamtheautomator.com/connect-azure-ad-to-office-365/"
---

# Connect Azure AD to Office 365: Install Azure AD Connect

> Discover how to connect Azure AD to Office 365, install Azure AD Connect, and enable directory synchronization for your tenancy.

Source: https://adamtheautomator.com/connect-azure-ad-to-office-365/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Connect Azure AD to Office 365: Install Azure AD Connect](https://adamtheautomator.com/wp-content/uploads/2020/07/microsoft_office_logo_press_image_1200x800-100751542-large.jpg)

# Connect Azure AD to Office 365: Install Azure AD Connect

[![](https://secure.gravatar.com/avatar/9a14f10ff1b1ec7d790d34f5b559e4d3de2d31b172e6ef266dfd8b479174d97b?s=192&d=mm&r=g)June Castillote](https://adamtheautomator.com/author/june/)2 July 20209 min. read

Categories: [Cloud](/category/cloud/)

Tags:[Azure Active Directory](/tag/azure-active-directory/)[Office 365](/tag/office-365/)

Table of Contents

*   [Requirements](#h-requirements)
*   [Checking the Pre-Installation Directory Synchronization Status](#h-checking-the-pre-installation-directory-synchronization-status)
*   [Using PowerShell](#h-using-powershell)
*   [Using the Admin Center](#h-using-the-admin-center)
*   [Installing Azure AD Connect](#h-installing-azure-ad-connect)
*   [Verifying the Azure AD Connect Installation](#h-verifying-the-azure-ad-connect-installation)
*   [Verifying Azure AD Connect in the Microsoft 365 Admin Center](#h-verifying-azure-ad-connect-in-the-microsoft-365-admin-center)
*   [Verifying the User Account Sync Status in the Microsoft 365 Admin Center](#h-verifying-the-user-account-sync-status-in-the-microsoft-365-admin-center)
*   [Verifying Azure AD Connect in the Azure AD Admin Center](#h-verifying-azure-ad-connect-in-the-azure-ad-admin-center)
*   [Verifying the User Account Source in Azure AD Admin Center](#h-verifying-the-user-account-source-in-azure-ad-admin-center)
*   [Verifying the Directory Synchronization Status using PowerShell](#h-verifying-the-directory-synchronization-status-using-powershell)
*   [Verifying Azure AD Connect Sync Cycle Schedule](#h-verifying-azure-ad-connect-sync-cycle-schedule)
*   [Running a Delta Sync Manually](#h-running-a-delta-sync-manually)
*   [Removing Azure AD Connect](#h-removing-azure-ad-connect)
*   [Uninstalling Azure AD Connect from the Server](#h-uninstalling-azure-ad-connect-from-the-server)
*   [Disabling Directory Synchronization](#h-disabling-directory-synchronization)
*   [Conclusion](#h-conclusion)
*   [Further Reading](#h-further-reading)

Finally, your organization is moving to Office 365! That sounds exciting and daunting at the same time. But now comes the task of connecting Azure AD to Office 365. Do you know how to connect Azure Ad to Office 365?

Not a reader? Watch this related video.

> Remove Exchange on-premises without compromising ease of management. [Use EasyEntra](https://easyentra.com/easyentra-ad-manager-freemium-edition/?utm_source=adam&utm_medium=paid&utm_campaign=easyentra&utm_content=freemiumarticle) instead of AD Users & Computers – Completely Free!

**_Not seeing the video? Make sure your ad blocker is disabled._**

One of the first things that would probably come to mind is how do you make sure that users are only using one credential to access on-premise and cloud resources. This is where [Azure AD Connect](https://adamtheautomator.com/azure-ad-connect/ "Azure AD Connect") comes into play.

With Azure AD Connect, your user accounts will be synchronized to Office 365, including their passwords. This means that whether your users are accessing network printers or accessing their emails in Office 365 they will only have to use one credential.

In this article, you will learn how to install Azure AD connect and enable directory synchronization for your Office 365 tenancy.

## Requirements

Since this is a step-by-step article, you need to have some requirements available if you plan to follow along with the examples.

*   An Azure AD Tenant. You can request for a _[free trial](https://azure.microsoft.com/en-us/free/)_ if you do not have a tenant yet.
*   Access to an On-Premise Active Directory. If you don’t have one, you can also use an Azure trial subscription to build a test server.
*   A server where Azure AD Connect will be installed.
*   _[Download the Azure AD Connect](https://www.microsoft.com/en-in/download/details.aspx?id=47594)_ installer.
*   A Global Administrator account in your Azure AD tenant.
*   An Enterprise Administrator account in your on-premises Active Directory.
*   Ensure that the _[Azure AD Connect and Azure AD ports](https://learn.microsoft.com/en-us/azure/active-directory/hybrid/connect/reference-connect-ports#table-2---azure-ad-connect-and-azure-ad)_ are allowed in your network.
*   The _[MSOnline module must be installed](https://learn.microsoft.com/en-us/powershell/azure/active-directory/install-msonlinev1?view=azureadps-1.0)_ on your management PC.

> _For a comprehensive list of requirements, you may visit [Prerequisites for Azure AD Connect](https://learn.microsoft.com/en-us/azure/active-directory/hybrid/connect/how-to-connect-install-prerequisites)_

## Checking the Pre-Installation Directory Synchronization Status

Before starting with the Azure AD Connect setup, let’s look at how to check the current status of directory synchronization in your tenant.

### Using PowerShell

To view the current DirSync status, you must first _[connect to Azure AD](https://learn.microsoft.com/en-us/powershell/azure/active-directory/install-msonlinev1?view=azureadps-1.0#connect-to-azure-ad)_. Then, use the command below to retrieve the information relevant to your organization’s directory sync status.

```powershell
Get-MsolCompanyInformation
```

After running the command above, you should see similar output in PowerShell, as shown below. As you can see for the below image, the value of `DirectorySynchronizationEnabled` is `False`.

![Getting the Azure AD Connect status from PowerShell](https://adamtheautomator.com/content/images/2020/06/Untitled--32-.png)

Getting the Azure AD Connect status from PowerShell

Other attributes, such as the `DirSyncServiceAccount`, `LastDirSyncTime`, and `LastPasswordSyncTime`, are not expected to have any values since directory sync has never been run.

### Using the Admin Center

You can also check the current DirSync in the Azure Active Directory Admin Center.

First, _[log in to the portal](https://aad.portal.azure.com/)_. Then, go to **Azure Active Directory** —> **Azure AD Connect**. Under the **Azure AD Connect sync** section, you should see the current status of the directory sync.

As you can see from the image below, it shows that the Azure AD Connect is _Not installed_, the Last Sync status value states that the _Sync has never run._ Lastly, the **Password Hash Sync** value is _disabled_.

![Getting the Azure AD Connect status from the Admin Center](https://adamtheautomator.com/content/images/2020/06/Untitled--33-.png)

Getting the Azure AD Connect status from the Admin Center

## Installing Azure AD Connect

Assuming that you’ve already met all the requirements, you’re ready to install Azure AD Connect on your server.

First, log in to the server where you plan to install Azure AD Connect. Run the installation file and follow the instructions presented.

The image below shows the **Welcome to Azure AD Connect** page. Take note of what’s being said (or don’t) and make sure to put a check of **I agree to the license terms and privacy notice.** Then, click on **Continue**.

![Accept the license terms](https://adamtheautomator.com/content/images/2020/06/Untitled--34-.png)

Accept the license terms

The next page is where you can _[choose the installation type](https://learn.microsoft.com/en-us/azure/active-directory/hybrid/connect/how-to-connect-install-select-installation)_. You can choose whether to **Customize** or **Use express settings**. In this example, Azure AD Connect will be installed using the express settings.

Choosing the express installation will:

*   Configure synchronization of identities.
*   Configure password synchronization from on-prem AD to Azure AD.
*   Execute initial sync.
*   Enable Auto Upgrade.

![Choose the express installation type](https://adamtheautomator.com/content/images/2020/06/Untitled--35-.png)

Choose the express installation type

Next, in the **Connect to Azure AD** page, enter the credential of the Global administrator account. As mentioned earlier in this article, a Global administrator account is required.

Once you’ve entered the credential, click **Next**.

![Provide the Azure AD Global administrator account](https://adamtheautomator.com/content/images/2020/06/Untitled--36-.png)

Provide the Azure AD Global administrator account

If the installer could use the Global admin credential you provided, you will be taken to the **Connect to AD DS** page.

You need to enter the account credential with enterprise administrator rights to your on-premise Active Directory. Then, click **Next**.

![Provide the Active Directory enterprise administrator account](https://adamtheautomator.com/content/images/2020/06/Untitled--37-.png)

Provide the Active Directory enterprise administrator account

After the credential is confirmed, you will be taken to the **ready to configure** page where you are presented with the list of actions that will be performed. These actions are:

*   Install the synchronization engine (local SQL express).
*   Configure Azure AD Connector.
*   Configure the <domain> Connector.
*   Enable Password hash synchronization.
*   Enable Auto Upgrade.
*   Configure the synchronization services.
*   Execute the initial synchronization process.

To proceed with the installation, click on **Install**.

![Confirm the installation](https://adamtheautomator.com/content/images/2020/06/Untitled--38-.png)

Confirm the installation

At this point, you only need to wait for the installation to complete.

![Azure AD Connect installation in progress](https://adamtheautomator.com/content/images/2020/06/Untitled--39-.png)

Azure AD Connect installation in progress

Finally, after the installation, configuration, and the initial synchronization is complete, you will see a  status page similar to the image below. Take note of the reminders and recommendations, then click **Exit**.

![Azure AD Connect installation completed](https://adamtheautomator.com/content/images/2020/06/Untitled--40-.png)

Azure AD Connect installation completed

## Verifying the Azure AD Connect Installation

Now that you’ve installed Azure AD Connect on your server, you will want to make sure the installation was successful, and that directory synchronization is working. In this section, you will learn several ways to confirm that Azure AD Connect synchronization is functional.

### Verifying Azure AD Connect in the Microsoft 365 Admin Center

The Azure AD Connect status is available by a default card in the Microsoft 365 admin center.

First, log in to the _[Microsoft 365 admin center portal](https://portal.office.com/adminportal#/homepage)_. Once you’re logged in, you should see the **Azure AD Connect** status under the **User management** card. See the screenshot below for reference.

![Azure AD Connect status in the Microsoft 365 Admin Center](https://adamtheautomator.com/content/images/2020/06/Untitled--41-.png)

Azure AD Connect status in the Microsoft 365 Admin Center

As you can see from the screenshot above, Azure AD Connect status shows that the recent **Directory Sync** was run 17 minutes ago. Additionally, **Password sync** is enabled.

### Verifying the User Account Sync Status in the Microsoft 365 Admin Center

You can also check whether the accounts in your On-Premise Active Directory are synchronized to Office 365.

To check the user account sync status, in the Microsoft 365 admin center, go to **Users —> Active Users**. When you look at the list of users, you would see the **Sync status** column showing whether the account is **In Cloud** or **Synced from on-premise.**

![On-Premise and Cloud only account sync status](https://adamtheautomator.com/content/images/2020/06/Untitled--42-.png)

On-Premise and Cloud only account sync status

Obviously, the accounts that are in the cloud are those accounts provisioned directly in Office 365 and does not exist in your on-premise Active Directory.

While the _Synced from on-premise accounts_ exists on-premise and synchronized to the cloud.

### Verifying Azure AD Connect in the Azure AD Admin Center

First, _[log in to the portal](https://aad.portal.azure.com/)_. Then, go to **Azure Active Directory** —> **Azure AD Connect**. Under the **Azure AD Connect sync** section, you should see the current status of the directory sync.

As you can see from the image below, it shows that the Azure AD Connect **Sync status** is _Enabled_, the Last Sync status value states that it was _Less than 1 hour ago._ Lastly, the **Password Hash Sync** value is _Enabled_.

![Azure AD Connect status in the Azure AD Admin Center](https://adamtheautomator.com/content/images/2020/06/Untitled--43-.png)

Azure AD Connect status in the Azure AD Admin Center

### Verifying the User Account Source in Azure AD Admin Center

Another way to verify that synchronization is working is by checking the user account source.

First, _[log in to the portal](https://aad.portal.azure.com/)_. Then, go to **Users** **—>** **All users**. Under the list of users, you’ll see under the **Source** column whether the account is from the **Windows Server AD** – which indicates that the account is synced from the on-premise Active Directory.

![User account source in the Azure AD admin center](https://adamtheautomator.com/content/images/2020/06/Untitled--44-.png)

User account source in the Azure AD admin center

### Verifying the Directory Synchronization Status using PowerShell

To view the current Azure AD sync status, you must first _[connect to Azure AD](https://learn.microsoft.com/en-us/powershell/azure/active-directory/install-msonlinev1?view=azureadps-1.0#connect-to-azure-ad)_. Then, use the command below to retrieve the information relevant to your organization’s directory sync status.

```powershell
Get-MsolCompanyInformation
```

After running the command above, you should see similar output in PowerShell, as shown below. As you can see for the below image:

*   The value of `DirectorySynchronizationEnabled` is `True`.
*   The account configured as the synchronization service account is shown.
*   `LastDirSyncTime` and `LastPasswordSyncTime` DateTime values are populated.
*   `PasswordSynchronizationEnabled` value is `Tru`

![Getting the Azure AD Connect status from PowerShell](https://adamtheautomator.com/content/images/2020/06/Untitled--45-.png)

Getting the Azure AD Connect status from PowerShell

### Verifying Azure AD Connect Sync Cycle Schedule

When you install Azure AD Connect, the AdSync [PowerShell module](https://adamtheautomator.com/powershell-modules/ "PowerShell module") is also installed along with it. Using the AdSync module, you can also check the current Azure AD Connect synchronization status on your server.

First, open PowerShell and then run this command below.

```powershell
Get-ADSyncScheduler
```

After running the code above, the result would show you the following:

*   The scheduled sync cycle interval (`AllowedSyncCycleInterval`)
*   Whether the sync cycle schedule is enabled (`SyncCycleEnabled`)
*   When the next sync is scheduled (`NextSyncCycleStartTimeInUTC`)
*   The type of sync that is scheduled to run next (`NextSyncCyclePolicyType`)

![Azure AD Connect Scheduler](https://adamtheautomator.com/content/images/2020/06/Untitled--46-.png)

Azure AD Connect Scheduler

### Running a Delta Sync Manually

Running manual delta sync is one way of determining whether the synchronization is working as expected. Delta sync means you are only synchronizing changes that were made after the last directory sync has run.

To test delta sync, choose an account from your on-premise Active Directory and change its display name value. In this example, the user account _AdSync_ will be used, and the display name will be changed to _AdSync1_.

![Display name changed](https://adamtheautomator.com/content/images/2020/06/Untitled--47-.png)

Display name changed

Then, in PowerShell, run this command below.

```powershell
Start-ADSyncSyncCycle -PolicyType Delta
```

After running the above command, wait for it to return the result, as shown in the image below.

![Delta Sync completed](https://adamtheautomator.com/content/images/2020/06/Untitled--48-.png)

Delta Sync completed

Then, go to the Azure AD admin center to confirm that the display name has changed. The image below shows the display name of the user _AdSync_ before and after the delta sync was run.

![Display name changed in Azure AD](https://adamtheautomator.com/content/images/2020/06/Untitled--49-.png)

Display name changed in Azure AD

## Removing Azure AD Connect

There may be a time when you will decide to remove Azure AD Connect and disable directory synchronization for your organization.

Suppose that you have a small organization, and you have already migrated all your users to the cloud. You no longer need to want to maintain any servers in your data center. That’s one reason to remove Azure AD connect.

### Uninstalling Azure AD Connect from the Server

To remove Azure AD Connect, follow these steps. First, uninstall Azure AD Connect from your server.

![Uninstall Microsoft Azure AD Connect from Programs and Features](https://adamtheautomator.com/content/images/2020/06/Untitled--50-.png)

Uninstall Microsoft Azure AD Connect from Programs and Features

When the **Uninstall Azure AD Connect** window shows up, make sure to select **Also uninstall supporting components**. Then, click **Remove**.

![Uninstall Azure AD Connect](https://adamtheautomator.com/content/images/2020/06/Untitled--51-.png)

Uninstall Azure AD Connect

Wait for the uninstall process to complete, and you should see a confirmation page like the one below.

![Azure AD Connect uninstalled successfully](https://adamtheautomator.com/content/images/2020/06/Untitled--52-.png)

Azure AD Connect uninstalled successfully

### Disabling Directory Synchronization

Once Azure AD Connect has been uninstalled from the server, the last action is to disable DirSync.

You must first _[connect to Azure AD](https://learn.microsoft.com/en-us/powershell/azure/active-directory/install-msonlinev1?view=azureadps-1.0#connect-to-azure-ad)_ using PowerShell. Next, use the command below to disable the directory synchronization for your Azure AD tenant.

```powershell
Set-MsolDirSyncEnabled -EnableDirSync $false
```

Once you run the command, you may get an error similar to the screenshot below.

![Error when disabling directory synchronization](https://adamtheautomator.com/content/images/2020/06/Untitled--53-.png)

Error when disabling directory synchronization

The error above means that you are not yet allowed to disable the synchronization. It may take several minutes to several days, depending on your tenant’s size, before you can disable DirSync.

When this happens, all you can do is wait and try the same command again. In this example, it took about 15 minutes of waiting. Running the command to disable DirSync this time was successful.

![Command to disable dirsync successfully completed](https://adamtheautomator.com/content/images/2020/06/Untitled--54-.png)

Command to disable dirsync successfully completed

> _After disabling DirSync and removing Azure AD Connect, the previously synchronized accounts from your on-premise AD to Azure AD will be converted to a cloud account. These converted accounts will no longer show as being synced from on-premise._

It may take several hours for the accounts to be fully converted from on-prem to cloud. In this article, it took approximately thirty-six (36) hours for the conversion to finish after disabling the directory synchronization. See the before and after comparison below.

![Before vs After disabling DirSync](https://adamtheautomator.com/wp-content/uploads/2020/07/image.png)

Before vs After disabling DirSync

## Conclusion

Azure AD Connect is an excellent tool that allows your on-prem user accounts to be synchronized to your Azure AD / Office 365 tenancy. When properly configured, your users will not have to be provisioned with separate accounts to access on-premise and cloud resources.

> With EasyEntra, first-level support teams can focus on what instead of where! [Manage AD, Entra ID, and Exchange Online](https://easyentra.com/?utm_source=adam&utm_medium=paid&utm_campaign=easyentra&utm_content=standardarticle) from a consolidated, intuitive console.

More configurations can be done with Azure AD Connect than what’s covered in this article. Azure AD Connect can be customized to change the sync cycle’s interval or disable the auto-upgrade when you want more control over upgrades.

I hope that what you’ve learned in this article, although as basic as possible, could help you get a better understanding of how to install, configure and use Azure AD Connect for your Office 365 tenancy.

## Further Reading

*   [**_Setting Up Hybrid Azure AD Join_**](https://adamtheautomator.com/hybrid-azure-ad/)
*   [**_How to Enable Active Directory Recycle Bin (Server 2016)_**](https://activedirectorypro.com/enable-active-directory-recycle-bin-server-2016/)
*   [**_How to Fully Remove Microsoft Azure AD Connect_**](https://interworks.com/blog/mroy/2018/07/25/how-to-fully-remove-microsoft-azure-ad-connect/)
*   **_[The proper way to Remove Azure AD Connect](https://answers.microsoft.com/en-us/msoffice/forum/msoffice_o365admin-mso_dirservices/proper-way-to-remove-azure-ad-connect/8b53a777-62c6-40ce-88bb-ab95aaf72df0https://answers.microsoft.com/en-us/msoffice/forum/msoffice_o365admin-mso_dirservices/proper-way-to-remove-azure-ad-connect/8b53a777-62c6-40ce-88bb-ab95aaf72df0)_**

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fconnect-azure-ad-to-office-365%2F&text=Connect%20Azure%20AD%20to%20Office%20365%3A%20Install%20Azure%20AD%20Connect)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fconnect-azure-ad-to-office-365%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fconnect-azure-ad-to-office-365%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2019/10/iot-3337536_1920.png)

### [Office 365 Group-Based Licensing & License Assignment](/office-365-group-based-licensing/)

Set up Office 365 group-based licensing and assign Office 365 licenses based on group membership in this tutorial.

![](https://adamtheautomator.com/wp-content/uploads/2026/05/featured_image-3.webp)

### [Survive the Azure AD B2C Sunset with Entra External ID](/azure-ad-b2c-entra-migration/)

Learn how to migrate Azure AD B2C to Microsoft Entra External ID—covering JIT credential migration, custom policy translation, HSC mode decisions, and phased cutover strategies.

![](https://adamtheautomator.com/wp-content/uploads/2026/04/featured_image-20.webp)

### [How to Secure Azure Service Accounts with Managed Identities](/secure-azure-managed-identities/)

Learn how to replace secret-based Azure service accounts with managed identities, grant least-privilege Azure RBAC access, validate token-based authentication,

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
