[AD Connect – Part 2] Starting synchronization + Soft Match by SMTP Address or UPN
Continuing with the configuration started in the post [AD Connect - Part 1] Installation and Custom configuration (without starting synchronization), the objective will be to deploy identity synchronization from an ADDS Domain located on an
AI-assisted translation, approved by Mateo.
Continuing with the configuration started in the post [AD Connect - Part 1] Installation and Custom configuration (without starting synchronization), the objective will be to deploy identity synchronization from an ADDS Domain located on an Azure VM (Madsblog.local) to Azure AD in an existing CDX Tenant (Madsblog.net).
We will perform this task through a Soft Match using the UPN (UserPrincipalName).
What is a Match?
The Match process in Active Directory involves the "merge" of identities in Azure AD and ADDS and changing the Source of Authority for the identities.

Match types
There are 2 types of Match:
- Hard Match: via the SourceAnchor (also called Immutable ID). This attribute does not change during the lifetime of an object and indicates that an object is the same both on-prem and in the cloud.
- When is it used? When a new synchronization engine server is generated, or regenerated, after a disaster recovery situation, this attribute links existing objects in Azure AD with local objects.
- It will also be used after performing a Soft Match for long-term matching of objects. That is, this is the "definitive" type of match for our identities.
- The SourceAnchor/ImmutableID attribute can be selected, but normally we will let AD Connect choose it. In that case, it will be msDS-ConsistencyGuid (based on objectGUID).
- Once an object from local AD has been imported into Azure AD Connect, its SourceAnchor value can no longer be changed. To specify the SourceAnchor value for an object from local AD, the ms-DS-ConsistencyGuid attribute must be configured before importing it into Azure AD Connect.
2. Soft Match: via proxyAddress ("SMTP:...") or UserPrincipalName (in that order).
When is it used? When we have an Azure AD tenant with identities and, at the same time, an on-prem ADDS with the same identities, but they are not synchronized through AD Connect.
Important Soft Match considerations
- SMTP vs UPN Matching
Soft Match has been enabled by default in AD Connect since March 30, 2016; that is, for it to work in the versions used today, there is no need to configure anything in the tool.
It is performed in this order: 1) AD Connect will attempt SMTP (proxyAddresses); if NO user has a match through this attribute, the tool will proceed to perform the soft match through 2) UPN (UserPrincipalName). To be able to perform matching through UPN we must make sure that there is no SMTP match for any of the identities to be synchronized.
The attribute to be used for the soft match must be properly planned according to the organizational scenario in which we are working.
2. Attribute Overwrite
It is VERY IMPORTANT to understand that performing a soft match changes the Source of Authority for the identities. This means that when the merge occurs, ALL attributes of the on-prem identities will be OVERWRITTEN on the cloud-based users. In addition, those cloud users will become listed in the cloud as "on-prem Synced" users.
In this regard, we must prepare and review all the attributes of our identities and make sure that no data is lost for the users to be synchronized.
From the user's standpoint, it is VERY IMPORTANT to notify them about the change to be made and tell them that, starting on date X, they must begin to use their on-prem user password to log in to both local and cloud resources.
If we have cloud attributes that we want to keep, we must plan a way to populate them on-prem.
Practical case
Scenario
In this case, we have the following scenario:
- Azure AD tenant with fully cloud-based identities. No identity synchronization through AD Connect.
- ADDS forest with a single domain containing the users' on-prem identities.
- In this scenario, users have duplicate identities: they use 2 different users, one to log in to Microsoft 365 and use cloud resources, and another distinct identity (with a different username and password) to use on-prem resources through ADDS.
Our goal, as we prepare to match identities, will be to "merge" (combine) these identities so that end users have only one (1 unique username and password) to use both resources: on-prem and cloud (M365), and to change the Source of Authority to ADDS.
We begin the tests:
In our previous blog post, we installed Azure AD Connect in our ADDS forest.
- In this scenario, we will simulate Soft Match through UPN Address because we do not have Exchange Server in our on-prem organization.
- We connect with the ExchangeOnline PowerShell module and verify the UserPrincipalName attribute for our cloud users.

Then we will verify the same for our on-prem users in ADDS.

- Now we will configure Domain and OU filtering in our AD Connect. For this case, we will synchronize only one OU intended to host the synchronized users: "AD Connect Sync Test".
- In real practical cases, it may be necessary to carry out this "pilot test" stage to make sure that the sync works correctly before matching all users.

- Once we finish, make sure that the "Start the synchronization process when configuration completes" check box is selected.

- Once synchronization is active, we can move the pilot user to perform the test. In this case, we select the user JoniS.

- We run a synchronization Delta.

We verify the user synchronization through the Synchronization Service.

- We verify in the Cloud that the user was synchronized: there are no duplicate identities and the "on-premises Sync enable" attribute is set to "Yes".

- We perform another test with other users and verify that it is completed correctly:


Thanks for reading. The learning continues in the next article.


