Multiple OKTA instances - One App - Unique Id


Our app is used by two different set of users - both have their own OKTA instances. A user can have his account (same email id/username) on both of these OKTA instances. As of now, we are using OKTA user ID as the unique id to identify the users in our database.

There is a possibility for having same OKTA user id in these two instances. In that case, could you please let me know the best way to uniquely identify the user? We can use authorization server name in addition to OKTA user id to identify the user. Looking to see if there is any better way.

Thanks for your time.