context.connectionOptions in Actions

Hi, I’m going to rewrite our Rules to Actions, but I found that we use context.connectionOptions in Rules. I tried to find related property/object in Actions, but I’m not successful.

So, I would like to ask, is there any option to get domain_aliases and tenant_domain in Actions?

Best regards,
Michal

Hi @MichalI,

Welcome to the Auth0 Community!

I understand you have questions about migrating your Rules to Actions, specifically, the context.connectionOptions object.

First, in Actions, there is not a 1:1 equivalent property to get the tenant_domain and domain_aliases from the event.connection object. The event.connection properties only include:

  • event.connection.id
  • event.connection.metadata
  • event.connection.name
  • event.connection.strategy

See here for the complete event object in Actions.

As a workaround, there is the option to call the Management API in actions using the Get a connection endpoint. Using this approach, you must pass the event.connection.id as the connection ID to get the tenant_domain and domain_aliases in the options object of the response.

Hoped this helps!

Please let me know if you need more clarification or have any questions.

Thank you.

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