I can't get app_metadata when using Wordpress auth0 plugin

Hello, I’m using Auth0 to authenticate to my Wordpress via the auth0 plugin. The issue I’m having is that the user object returned after login doesn’t include the app_metadata.

Does anyone know how to get the app_metadata from the user object? I’m using the free auth0 tier to do some testing. Maybe that’s not possible on free tier?

Any help will be appreciated.

Hi @schultzRr,

Welcome to the Auth0 Community!

It seems that the app_metadata field is not returned from the user object by default. If you need it, you might be able to make this work by appending it as a custom claim to the ID token.

If that does not work, you may need to make an API call to get the user’s app_metadata.

This should work even on the free tier.

Let me know how this goes for you.

Thanks,
Rueben

And how can I do this if I’m using the Wordpress plugin? I’m not familiar with this “custom claim to the ID token.”

The plugin I’m talking about is the official one by auth0: