Auth0 Home Blog Docs

Suddenly, "auth0 is not defined" is triggered in a rule



We have been using Auth0 rules for a long time for role-granting purposes. Today some people reported their user accounts are not being successfully granted.

I took a look at the rule definition and an error message is triggered: “auth0 is not defined”, specifically in the line auth0.users.updateAppMetadata(user.user_id, user.app_metadata)
The rule I used is the one from the template “Set roles to a user”.

Is this error related in somehow to the upcoming deprecation policy?

Thanks in advance.


Having the same issue right now on an EU-Free tier …


I get this warning as well but i don’t think it is actually causing any issues. You should check your logs with the debugger to see if there’s anything else happening


Can confirm I notice the same behavior


There is currently an issue with the editor, where it does not recognise the auth0 object from statements as your auth0.users.updateAppMetadata. It does not affect the actual rule, as the object is available at runtime, and this UI issue is now being addressed by engineering. As @luke mentioned, your issue might be elsewhere, so you might want to check the logs or try to replicate the issue to better understand why it is happening.


I’ve just checked the rule and there was a typo I missed yesterday. The malfunctioning rule was my fault :S
As you said, the UI error does not affect the rule.
Thanks a lot for your comments, @luke and @ricardo.batista.