oktadev / okta-aws-cli-assume-role

Okta AWS CLI Assume Role Tool
Apache License 2.0
338 stars 177 forks source link

Getting Exception in thread "main" org.json.JSONException: JSONObject["sessionToken"] not found. #382

Open pranaj-roy opened 3 years ago

pranaj-roy commented 3 years ago

Setting up using Windows machine

I have been trying to setup the okta-awsCli based caller identity, it always lands me to an error related to SMS factor based Authentication and then looks up for some session Token, which is maybe not found and hence an exception occurs, which then stops the command execution there abruptly. I have already configured the config.properties file to use TOTP based MFA but seems like that is not getting picked up. I am in need of bit of help here.

MicrosoftTeams-image (29)

I have configured following values in config.properties file - OKTA_ORG=mgmresorts.okta.com

      OKTA_AWS_APP_URL

      OKTA_AWS_REGION

      OKTA_USERNAME

      OKTA_PROFILE=default 

      OKTA_MFA_CHOICE=OKTA.token:software:totp

I used jdk-11 for this.

PavanKonda commented 2 years ago

Is this issue resolved , Even I facing the same issue , please help me to resolve the issue

RomanPavelko commented 1 year ago

Faced this issue today. SMS MFA crashes all the time. I added additional method to MFA in my OKTA profile which was "Security Question" and I was able to proceed selecting it during script execution.