Auth0 Home Blog Docs

Custom field with auth0 database

I’m using multiple database connections to manage user-tenant hierarchy
Now I want to add metadata for each tenant
I see that when using own database it can be done, but I’m using Auth0 db

How can it be done?
Thanks

You can add custom data relevant for authentication and authorization into the user metadata of any user, independently of the connection with which they are associated so for that scenario you could still consider app_metadata which is available in database connection either custom or regular ones (https://auth0.com/docs/users/concepts/overview-user-metadata).

But when adding a new user to a connection I need to copy those field to that user too
Can’t I add something to the group level?

I’m afraid I may not be fully understanding the situation; what do you mean by at the group level? You may need to provide a much more detailed description of your scenario.

By group level I mean tenant
Each connection database represent different tenant
I’m need to store extra data for each tenant (for example what is it from)

If each connection represents a tenant there’s also the notion of a metadata field at the connection level (https://auth0.com/docs/api/management/v2#!/Connections/post_connections).

Great! this is just what I was looking for
Can It be seen somewhere in the GUI?

As far I’m aware I believe the management of this metadata is only currently supported through the API so it’s not surfaced in the dashboard.