Sometimes it happens, users syncronized from OnPrem to AzureAD, are not being soft matched, and it’s necessary to do a hard match, in this post I will explain the basic steps to do it:
- Disable the sync for that particular object, my recommendation would be to create a OU in your AD which is not being selected to be synchronized
- Execute a Sync Delta in your ADConnect
Start-ADSyncSyncCycle -PolicyType Delta
- Check that the bogus user has been deleted, and delete it from Recycle bin with
Remove-MsolUser -UserPrincipalName <user> -RemoveFromRecycleBin
- Find the users ObjectID
ldifde -d "CN=username,CN=Users,DC=domain,DC=local" -f C:\user.txt
- Find
objectGUID::
inc:\user.txt
- If you don’t like the previous step, you can search for the sourceanchor in the metaverse of AADConnect,
- Update AzureID, setting the object ID to sync with to
Set-MsolUser -UserPrincipalName <upn> -ImmutableId <objectGUID>
- Now, sync with
Start-ADSyncSyncCycle -PolicyType Initial

With this, what we are doing id a hard match for the user, once is done, you’re ready to go