Here is a method which you can use to merge multiple user and group accounts into a single account in the target domain. The main goal is to get the objectSID from all source accounts and add them to a single account (sidHistory) in the target domain.
Here are the high level steps:
Step1 – Create an input file with source and target account samAccountName in the following format:
In this example, I am merging suser1 source account with tuser account in the target domain.
Step 2 – Perform user migration using QMM.
Step 3 – Clear the QMM matching attributes. As you can see on the following screenshot, QMM has populated the Object GUID and Domain Pair ID values in the matching attributes. I am using adminDescription and adminDisplayName as the QMM matching attributes. These values need to be cleared before you can perform the second user migration.
If you don’t clear the QMM matching attribute value, you will see the following error message in the QMM log file and the migration will fail:
Step4 – Update the input file with 2nd source account and repeat Step 2 and 3.
In this example I merged 3 accounts into a single account. As you can see the in the following screenshot, the target account has 3 values in the sidHistory attribute.
If QMM directory synchronization is enabled, the user properties, group membership etc will get updated based on the recent AdminDisplayname and AdminDescription values.