The refresh_token was generated for a user who doesn't exist anymore

I’m receiving an error message when I tried to get a refresh token.

Message: The refresh_token was generated for a user who doesn’t exist anymore.

But the user is not deleted, not linked with other account and the connection with database is okay, can you guys help me about this issue?

Edit: My database have custom database enabled.

Hi @sergio.tomas ,

Welcome to the Auth0 Community!

I noticed that you opened a support ticket for the same issue. I will add the solution to this topic once it’s resolved. Thanks!

Removing the user_id property from app_metadata and using a role script to obtain this property without get this property from app_metadada