Skip to content

export fails on triggers with error: "cannot list action bindings for an entity-bound trigger" #988

@bhaugeea

Description

@bhaugeea

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this tool and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

Given "triggers" as an included resource type, Deploy CLI gets all triggers and then for each one gets all bindings. For entity-bound triggers, Auth0 Management API responds with 400 cannot list action bindings for an entity-bound trigger. Deploy CLI then fails with that error. There is no logic that I can see in Deploy CLI to check whether a trigger is entity-bound before trying to list bindings.

Expectation

Deploy CLI should gracefully exclude off-limits entities from both export and import. I'm happy to open a PR to check whether the trigger is entity-bound, but I'm not sure if simply excluding that data from the export would create diffing/import problems. Just let me know.

Reproduction

I am testing in a more or less fresh tenant as a new Auth0 customer, and this is my first time trying to use Deploy CLI. The issue is consistent and can be seen in the code linked in the description and also in the Management API test request described below. I'm not sure what if any customizations could be made in the tenant to avoid the error, and similarly not sure why others aren't encountering/reporting it.

  1. Check the response that Auth0 Management API returns for the offending request here with custom-token-exchange, which in my case is said by GET /triggers to be (the only) entity-bound. It is the error thrown by Deploy CLI.
  2. Run the Deploy CLI export command with "triggers" included, and with adequate scopes applied to the token.
  3. Deploy CLI throws above-mentioned error.

If you have trouble replicating, start by using the /triggers endpoint to see if you have any entity-bound triggers (I say this naively; maybe you are guaranteed to, but I'm not sure). If not, then that is why you aren't encountering the error.

Deploy CLI version

8.2.0

Node version

22.7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions