Firstly, AAD Connect (DirSync) Hard-Matching is a steps in getting the immutableID based from the AD objectID and manually setting it to the MSOL user.
For instance, we will use the made up object below to apply AAD Connect (DirSync) Hard-Matching steps.
In addition, determine if your sourceAnchor setup to be using ObjectID.
The sourceAnchor attribute is defined as an attribute immutable during the lifetime of an object. It uniquely identifies an object as being the same object on-premises and in Azure AD. The attribute is also called immutableId and the two names are used interchangeable.
# Import AD Module Import-Module ActiveDirectory # Check if the user is identifiable Get-ADUser -Identity "UserName_or_SamAccountName"
# Convert and encapsulate the ObjectGuid to and ImmutableID # UserName is the same SamAccountName $guid = (get-Aduser UserName).ObjectGuid $immutableID = [System.Convert]::ToBase64String($guid.tobytearray())
Connect-MSOLService Set-MSOLuser -UserPrincipalName clouduserUPN -ImmutableID $immutableID
# Open PowerShell from your AD server Start-ADSyncSyncCycle -Policytype Delta
email@example.com (synced with AD)
Should you have one, click here