Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HELP: Automated build system script firing Authenticator app even when using certificate for 2FA #331

Open
irobotbfealy opened this issue Oct 10, 2022 · 1 comment
Assignees
Labels
help wanted Extra attention is needed

Comments

@irobotbfealy
Copy link

sfcc-ci Version

2.9.1

NodeJS Version

8

sfcc-ci Path

No response

Host OS Details

Bamboo build agent on Windows 10

What happened?

Running the client:auth, code:deploy and code:activate steps using a client ID/Secret combo, and a certificate/Passphrase for 2FA, yet the Authenticator app still fires requiring human interaction when deploying into our Staging environment.
Commands being executed;
node.exe .\node_modules\sfcc-ci\cli.js client:auth $clientID $clientSecret $clientUsername $clientPassword

node.exe .\node_modules\sfcc-ci\cli.js code:deploy --instance $targetsystem $zipfile --certificate $certificatepath --passphrase $passphrase

node.exe .\node_modules\sfcc-ci\cli.js code:activate --instance $targetsystem $codevername

Relevant log output

No response

@irobotbfealy irobotbfealy added the help wanted Extra attention is needed label Oct 10, 2022
@tobiaslohr
Copy link
Contributor

Hi @irobotbfealy, it appears that through authentication:
node.exe .\node_modules\sfcc-ci\cli.js client:auth $clientID $clientSecret $clientUsername $clientPassword
You are authenticating not just with client credentials but also with user credentials. As a consequence, the MFA settings of the user and his primary org are being used through the authentication process and as a result the user is receiving the request to confirm the login in Salesforce authenticator. This blocks automation, of course.

Recommendation is, that you run the authentication only with client credentials but not with user credentials, like:
node.exe .\node_modules\sfcc-ci\cli.js client:auth $clientID $clientSecret

Please let us know, if that helps to resolve the issue.

@tobiaslohr tobiaslohr self-assigned this Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants