I assume that with your SSO logic, a Mendix account is created on the first login, and if an account already exists, that Mendix account is used for each subsequent login.
You'd have to take a look where this happens in a microflow, and build your own custom logic to retrieve the existing account based on some other ID if that is available. If no such ID is available, then matching accounts would have to be done manually and you'd have to build logic for that.