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.

I’ve implemented a rule using the script:

Using the Auth0 Test Runner, I have the entire script works great (including connecting with Salesforce) but it chokes up on

which calls auth0.users.updateAppMetadata(user.user_id, user.app_metadata);. I get a similar error:
“ReferenceError: auth0 is not defined”. Is this still an issue with the editor?

thanks you for your time.

Hey there!

Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.

Wanted to reach out to know if you still require further assistance?