sfcc-ci icon indicating copy to clipboard operation
sfcc-ci copied to clipboard

Problem with CLI commands due to implementation of MFA.

Open saipavwan opened this issue 4 years ago • 3 comments

Hi we are facing an issue with SFCC CLI commands after we implement MFA for Account Manager. We are trying to get all the users list using command sfcc-ci user:list --json -c 5 .So when script was on fly we are getting a pop up to the mobile for account login every time so scripts getting failed due to time outs. Can you guys suggest something to overcome this? Thanks in advance.

  • Sai Pavwan.

saipavwan avatar Oct 05 '20 21:10 saipavwan

Could you check to see whether the AM user you authenticate with has a role assigned, which requires 2-FA ?

In order to pull the users automatically you may authenticate an API client (not a user) and grant this API client the role required to access users in your AM org (the Account Administrator role)

Can you try this and let me know if you are still facing any issues ?

Rohith13 avatar Oct 07 '20 17:10 Rohith13

Hi @Rohith13,

I see only two options to assign role to an API key:

  • Salesforce Commerce API
  • SLAS Organization Admin

I have enabled both and set MFA only for users with Business Administrator role inside this organisation but I'm still being asked to approve the login request when using sfcc-ci.

Trimud avatar Oct 28 '20 21:10 Trimud

@Trimud @saipavwan As @Rohith13 pointed out, you have to assign role Account Administrator to your API client and only authenticate the API client via sfcc-ci client:auth <client-id> <secret>. You are explicitly NOT authenticating a user.

If you don't see role Account Administrator with your API client, I suggest you open a Support Case and have support assigning it on your behalf.

tobiaslohr avatar May 26 '21 22:05 tobiaslohr