1

I'm trying to find a way to reset default scratch org user's Security Token via CLI. Is that even possible?

2
  • One way i know generate password for scratch org and then login and do a token reset
    – RedDevil
    Apr 17 '20 at 11:12
  • Yeah, that's a manual way, I am looking for a script compatible CLI option.
    – VarunC
    Apr 17 '20 at 11:25
4

Generating a password for the user (force:user:password:generate) should automatically send you an email with the security token. There's no separate command for this in the CLI. You would use the UI if you want to reset the token without resetting the password.

3
  • I have reset my password using below command but have not received any email with security token. Am I missing something? sfdx force:user:password:generate --targetusername test-skf2aegzbtzi@example.com
    – Swetha
    Jul 8 '20 at 12:00
  • @Swetha The token should have been sent by email. Regardless, if you haven't received it, you can manually reset it from the Setup screen.
    – sfdcfox
    Jul 8 '20 at 13:25
  • @sfdxfox Resetting password via UI (My Username> my settings> Reset password)too does not send me the security token.
    – Swetha
    Jul 8 '20 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.