SalesforceCommerceCloud / sfcc-ci

Salesforce Commerce Cloud CLI
https://npmjs.com/package/sfcc-ci
BSD 3-Clause "New" or "Revised" License
231 stars 93 forks source link

statusCode: 400, body: { error_description: 'Resource owner authentication failed', error: 'invalid_grant' } } } Error: Authentication failed: Resource owner authentication failed #297

Open mani762 opened 2 years ago

mani762 commented 2 years ago

We are failing to upload our artifacts to all Env , please look this in priority. This is blocking our release activity. Please more logs: statusCode: 400, body: { error_description: 'Resource owner authentication failed', error: 'invalid_grant' } } } Error: Authentication failed: Resource owner authentication failed

tobiaslohr commented 2 years ago

Hi @mani762, users have reported this before in https://sfcc-unofficial.slack.com/archives/CAUFG3SHF. The root cause is that your user account you use to authenticate has a MFA verifier set. Most probably due to your organizations policies in Account Manager of enabling MFA across the org and all roles or widening it to the roles that user has.

In this case the Account Manager revokes the authentication and returns with that error. I recommend, that you switch from the combined client / user authentication to a pure API client authentication using purely the client id and the secret as I assume for the deployments you are anyways seeking for an automation scenario.

tobiaslohr commented 2 years ago

In addition we put a document in our wiki at https://github.com/SalesforceCommerceCloud/sfcc-ci/wiki/Resource-Owner-Password-Credentials-Authentication-Failure which describes how to resolve this.

tobiaslohr commented 2 years ago

@mani762 Did the above help you to resolve your issue and can we close this?