Authentication issues with SF CLI orgs.


Question

When attempting to execute a migration job and connect to my orgs, I encounter the following error:

Command initialization error: Access token to the CAREFUL_PRODUCTION_CAREFUL has expired or the user has no access.

How can I resolve this?


Answer

This error can occur for several reasons:

  • If you're using the orgs section in export.json (instanceUrl + accessToken), the token may have expired. Regenerate and update those values.

  • If you're using CLI alias-based auth, ensure your local auth is current and refresh it:

    • sf org login web --alias <alias>
    • sf org display --target-org <alias> --json
  • Verify that apiVersion in your export.json is formatted as a string, not a number. For example, use "65.0" instead of 65.0.

  • If you do not need a fixed API version, remove apiVersion from export.json and let SFDMU auto-detect the default API version for your org setup.


Related Articles

Last updated on 20th Feb 2026