Skip to content

Error: Problem exporting emailProvider, TypeError: Cannot use 'in' operator to search for 'smtp_user' in @@SMTP_CREDENTIALS@@ using directory (json) format #1467

Description

@TimeTravelerFromNow

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

Using the latest version v8.43.0 of the tool, performing an export where smtp credentials are an array throws an error:

2026-08-20T17:25:59.151Z - debug: TypeError: Cannot use 'in' operator to search for 'smtp_user' in @@SMTP_CREDENTIALS@@
    at emailProviderDefaults (/Users/sebastiandetering/dev/tools/nb-auth0/node_modules/auth0-deploy-cli/lib/context/defaults.js:32:48)
    at /Users/sebastiandetering/dev/tools/nb-auth0/node_modules/auth0-deploy-cli/lib/context/directory/handlers/emailProvider.js:34:57
    at Object.dump (/Users/sebastiandetering/dev/tools/nb-auth0/node_modules/auth0-deploy-cli/lib/context/directory/handlers/emailProvider.js:37:7)
    at /Users/sebastiandetering/dev/tools/nb-auth0/node_modules/auth0-deploy-cli/lib/context/directory/index.js:160:31
    at Array.map (<anonymous>)
    at DirectoryContext.dump (/Users/sebastiandetering/dev/tools/nb-auth0/node_modules/auth0-deploy-cli/lib/context/directory/index.js:158:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async exportCMD (/Users/sebastiandetering/dev/tools/nb-auth0/node_modules/auth0-deploy-cli/lib/commands/export.js:60:5)
    at async run (/Users/sebastiandetering/dev/tools/nb-auth0/node_modules/auth0-deploy-cli/lib/index.js:34:9)
2026-08-20T17:25:59.152Z - error: Problem running command export
2026-08-20T17:25:59.152Z - error: Problem exporting emailProvider
2026-08-20T17:25:59.152Z - debug: Error: Problem exporting emailProvider
    at /Users/sebastiandetering/dev/tools/nb-auth0/node_modules/auth0-deploy-cli/lib/context/directory/index.js:164:23
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Promise.all (index 7)
    at async DirectoryContext.dump (/Users/sebastiandetering/dev/tools/nb-auth0/node_modules/auth0-deploy-cli/lib/context/directory/index.js:152:9)
    at async exportCMD (/Users/sebastiandetering/dev/tools/nb-auth0/node_modules/auth0-deploy-cli/lib/commands/export.js:60:5)
    at async run (/Users/sebastiandetering/dev/tools/nb-auth0/node_modules/auth0-deploy-cli/lib/index.js:34:9)

Expectation

Expected:
The keyword preservation of @@SMTP_CREDENTIALS@@ succeeds upon export.
No error is thrown.

Reproduction

  1. Perform an export in directory (json) format like so
npx auth0-deploy-cli export \
  --strip \
  --format directory \
  --output_folder ./${output_folder} \
  --config_file ./${output_folder}/${from_tenant}.json \
  --debug true
  1. Wait
  2. Export fails at debug: TypeError: Cannot use 'in' operator to search for 'smtp_user' in @@SMTP_CREDENTIALS@@

Deploy CLI version

8.43.0

Node version

v22.15.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions