Using app_metadata to store client ID in a multi-tenant application

Hi,

I’m building a multi-tenant application, and I’m currently using the app_metadata to store the the client id for each user. This client ID is added to the JWT upon authentication using a rule, and in turn, extracted by my app backend to understand which client this user belongs to.

Am I doing the right thing, or is there a better way to manage multi-tenant users?