Synchronize Users from Windows Server 2019 Active Directory to Azure AD

line5

This tutorial shows you how to migrate user accounts from Windows Server 2019 Active Directory to Azure Active Directory Domain Services via Azure Active Directory Connect.

KEEP IN MIND

  • A virtual Active Directory in Windows Server 2019 test environment was created using VMware Workstation to perform the migration process.
  • Please note that, for this tutorial, freely available Microsoft Azure subscription is used.
  • The tutorial is divided into 5 main sections
      1. Create a tenant
      2. Add the domain name
      3. Create a global user
      4. Download Azure AD Connect
      5. Install Azure AD Connect and initiate synchronization

POST CONFIGURATION TASKS

Windows Server 2019 Active Directory is configured to prepare for the synchronization process.

Link to create Active Directory in Windows Server 2019:

https://techencyclopedia.wordpress.com/2020/02/16/how-to-install-active-directory-in-windows-server-2019-step-by-step-guide/

Couple of test users are created in Active Directory for synchronization

test users

01 CREATE A TENANT

To make the project more organized, a new tenant is created to configure the Azure Active Directory users. A tenant represents an organization in Azure Active Directory.

Choose the Azure Active Directory resource from the Microsoft Azure Portal.

Alternatively, you can search from the search bar located at the top of the screen.

tenant create 1

Click the + Create a tenant to create a new tenant

tenant create 2

Configure the Basics tab

For the tenant type, Azure Active Directory is chosen

tenant create 3

Configure the Configuration tab

Provide the Organization name

Provide the Initial domain name (This will be changed later on)

Provide the Country or Region (The Datacenter location will be based on this input)

tenant create 4

Review and Create the tenant

After, reviewing the new tenant information, click create to finalize

tenant create 5

After creating the new tenant, switch from the default tenant to the new one.

Go to the Azure Active Directory Overview

Click on Switch tenant

tenant create 6

Switch to the new tenant

tenant create 7

Confirm that you are connected to the new tenant before proceeding forward.

tenant create 8

02 ADD THE DOMAIN NAME

The domain is added to the Azure Active Directory. This should be the same domain name that configured the user accounts in on premises Active Directory Domain Services.

Click on + Add Custom domain to add the domain

domain name 1

To verify the domain name there will be a delay since to propagate DNS records it will take up to 72 hours. However, please note that most of the times it will take less than 72 hours.

To complete the domain name verification process, create following 2 DNS records in the domain name registrar (GoDaddy)

  • TXT
  • MX

domain name 2

TXT record is added to the GoDaddy (add the MX record as well before clicking the verify button)

domain name 3 txt record

After verifying the domain name make it the primary domain name.

Click on the newly added verified domain name

domain name 4 after verfication

Click on the Make primary 

domain name 5 make domain name primary

03 CREATE A GLOBAL USER 

As for the next step, you have to create a user account in Azure Active Directory and provide the Global Administrator privileges. Global Administrator possess all the permissions to manage all aspects of Azure AD and Microsoft services that use Azure AD identities.

Go to users in Azure Active Directory

global user 1

Click on + New user to start creating a new user process

global user 2

Choose the Create user option

global user 3

Insert the details under Identity section

Add the User name and make sure the correct domain name is selected.

global user 4

Configure the password options

In this case, new password is given instead of allowing to generate a password

global user 5

Groups and roles section is configured

For the role, Global administrator is chosen from the directory roles menu

global user 6

After changing the role it will look like this

global user 7

Complete the rest of the configuration

Block sign in option should be ‘no’ and it is selected by default

After completing the user configuration click create to finalize

global user 8 final step

After the new global user is created using the credentials log back in to the Azure portal. You will have to change the given password and provide phone authentication details to continue. 

Enter the user name to sign in

log back 1

Enter the previously given Password

log back 2

Next screen will prompt you to Update your password

log back 3

After logging in authentication phone details should be given

log back 4

Now you are logged in as the newly created User with Global Administrator privileges

log back 5

Search for Azure Active Directory resource to make further configurations

log back 6

04 DOWNLOAD AZURE AD CONNECT

After logging back in as the global administrator, go to the Azure Active Directory and download Microsoft Azure Active Directory Connect.

Click on Azure AD Connect to proceed

Azure Ad sync 0

Click on Download Azure AD Connect to go to the Microsoft Download page

Azure Ad sync 1

Click on Download button to continue

Azure Ad sync 2 download

Read the system requirements and install instructions prior to installing the Azure Active Directory Connect. The System Requirements will provide the information of the supported Operating Systems.

Azure Ad sync 3 details

The System Requirements

Azure Ad sync 4 sys req

05 INSTALL AZURE AD CONNECT AND INITIATE SYNCHRONIZATION 

Azure AD Connect is installed in the on-premises Windows Server 2019 Active Directory Domain Controller to initiate the synchronization process.

Log in to Windows Server 2019 (Install and configure AD in Windows server 2019)

(Active Directory user should have Enterprise domain administrator privileges)

2019 AD 2 Azure-2020-07-28-22-46-07

Double click on downloaded Azure AD Connect setup file to install Azure AD Connect

2019 AD 2 Azure-2020-07-30-21-36-54

Agree to the license terms and privacy notice to continue with the instillation

2019 AD 2 Azure-2020-07-30-21-37-30

In this case, Express settings are used

2019 AD 2 Azure-2020-07-30-21-37-36

Enter the Azure AD global user credentials

2019 AD 2 Azure-2020-07-30-21-40-08

Browser window will prompt to sign in to the account using the password

2019 AD 2 Azure-2020-07-30-21-44-04

Complete the phone authentication process

2019 AD 2 Azure-2020-07-30-21-44-28

Enter the credentials to connect to the on-premises Active Directory

2019 AD 2 Azure-2020-07-30-21-45-33

Tick to start the synchronization process right away after completing the installation

2019 AD 2 Azure-2020-07-30-21-45-42

Sign in to Azure to check that on-premises Active Directory users are synchronized to the Azure Active Directory. 

Go to Azure Active Directory > All users

user sync

By default the sync process is scheduled to run every 30 minutes. You might want to use sync powershell commands to manually run the process.

Azure AD Connect sync: Scheduler

Read more at:

https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-sync-feature-scheduler

The scheduler is by default run every 30 minutes. In some cases, you might want to run a sync cycle in between the scheduled cycles or you need to run a different type.

To see your current configuration settings, go to PowerShell and run

Get-ADSyncScheduler

If you need to manually run a sync cycle, then from PowerShell run

Start-ADSyncSyncCycle -PolicyType Delta

To initiate a full sync cycle, run

Start-ADSyncSyncCycle -PolicyType Initial

2019 AD Azure -2020-07-21-23-59-42.png

TROUBLESHOOTING

CANNOT DELETE USERS ACCOUNTS

If you get an error that can’t manage or remove objects that were synchronized through the Azure Active Directory Sync tool it can be two reasons.

This issue may occur if one or more of the following conditions are true:

  • The on-premises AD DS is no longer available. Therefore, you can’t manage or delete the object from the on-premises environment.
  • You deleted an object from the on-premises AD DS. However, the object wasn’t deleted from your cloud service organization. This is unexpected behavior.

Read more at following article

https://docs.microsoft.com/en-au/troubleshoot/azure/active-directory/cannot-manage-objects

Leave a comment