Heroku CLI login --interactive option no longer supported with Salesforce MFA

With the migration to Salesforce Multi-Factor Authentication (MFA), the --interactive/-i option for heroku login command is no longer supported. This option was used to login in the CLI without requiring a browser to complete authentication.

Once your account is enrolled into the Salesforce MFA, using the --interactive/-i option will show a message like:

› Error: Multi-Factor Authentication is required for your account. Please remove the
› '--interactive' parameter and try again to login and complete MFA verification using a web
› browser.
›
› Error ID: mfa_required

To login to the Heroku CLI when a browser is not available, you will need to generate an API key on a machine which does have access to a browser. The API key can then be used to create a .netrc file or set a HEROKU_API_KEY environment variable which the Heroku CLI can use to authenticate. More details in the Dev Center article, Heroku CLI Authentication.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support
Terms of Service Privacy Cookies © 2021 Salesforce.com