Hello!
To solve this I set Automatic account link on initial logon
to yes
This way if an existing user shares the email address (e.g. from an import and then the system switches to OAuth) it is linked to the existing Zammad account
Please verify with your use case if this is what you are looking for in the official documentation here:
https://admin-docs.zammad.org/en/latest/settings/security/third-party.html#automatic-account-link-on-initial-logon
Best,
Skip