Hi @german,
Welcome to the Auth0 Community!
I understand that you would like to use the Management API in your backend but encountered the “Unauthorized” error.
After my investigation, it appears that your NextJSApp is a Regular Web Application.
In this case, you will need to use the credentials of a Machine-to-Machine application with the Client Credentials grant enabled to use the Management API.
I recommend checking out Get Management API Access Tokens for Production documentation for more details.
Please let me know how this goes for you.
Thanks,
Rueben