1

I followed this article (JWT Flow Authorization) but I am getting the following error:

Error: Error retrieving access token:
{"error":"invalid_grant","error_description":"user hasn't approved this
consumer"}

The command I'm trying to run is:

cci task run robot \
 --org myOrgName \
 --vars BROWSER:headlesschrome \
 --suites ./mytestsuite.robot

Does anybody know what I might be missing?

Highlights:

  1. I have the variable CUMULUSCI_ORG_myOrgName defined;
  2. The connected app is already being used by the sfdx cli;
  3. I have added the full scope to the connected app;
  4. The SFDX_AUDIENCE_URL is defined

1 Answer 1

0

You need to grant authorization once :

sfdx force:auth:jwt:grant -i <connected app client_id> -f <pathname to private key file> -o <username>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .