State or SubdivisionCode variable in Blocked Account Email?

Is there a way to get the state or subdivision code, e.g. CA, WA, as a variable in the Blocked Account Email template?

It is not listed in the Common Variables | Auth0 nor in the Block account emails | Auth0 documentation, but it would be a useful variable to send in the email.

Edit: The event.Request.GeoIP.SubdivisionCode variable, which is the state for U.S., is available in Auth0 actions, but it does not appear to be available for Auth0 email templates.

2 Likes

Hi @toanderson,

Welcome to the Auth0 Community!

It doesn’t look like the event.Request.GeoIP.SubdivisionCode variable isn’t directly available in the blocked email templates (you can use the {% debug %} template variable to see what all is included in the templater).

If you want to pass some custom data to the template, you can do so via the users metadata. For example, you could add the SubdivisionCode to the user’s app_metadata in a Post Login Action, then access it in the template.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.