@Norbert de Graaf Thanks for reaching out.
The error you mentioned most often occurs when an object was converted from a synced user to a cloud-only user, however, the user may not have been deleted properly from the on-prem AD.
Option1:
Identify the affected object in Azure AD. Confirm if you really want to delete the object. If that's the case, simply use PowerShell to permanently delete the object from Azure AD.
Run the cmdlet : "Connect-MsolService" and enter your global admin credentials
Next, run : "Remove-MsolUser -ObjectId "<user's object ID>" -RemoveFromRecycleBin"
Trigger a delta sync by running the cmdlet : "Start-ADSyncSyncCycle -PolicyType Delta"
Option2:
If the object has been deleted in Active Directory but you want to keep the "Cloud-Only" object in AAD, simply use PowerShell to clear the SourceAnchor / ImmutableID from the object.
Run the cmdlet: "Connect-MsolService" and enter your global admin credentials
Next, run : 'Set-MsolUser -ObjectId '<user's object ID>' -ImmutableId "$null"'
Trigger a delta sync by running the cmdlet : "Start-ADSyncSyncCycle -PolicyType Delta"
-----------------------------------------------------------------------------------------------------------------
Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.