<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00009q0rg9CAAOkta Classic EngineAuthenticationAnswered2023-11-14T23:35:14.000Z2023-11-14T00:28:42.000Z2023-11-14T23:35:14.000Z

TristanS.20105 (Customer) asked a question.

saml2aws (AWS CLI tool) 401when app policy requires MFA

Hello, we formally used a different IDP and was successful in utilizing the CLI tool "saml2aws" for terminal access to AWS resources. Note this is not IAM Identity Center (formally AWS SSO), but rather this is regular federation via SAML into an IAM role. The saml2aws app would always prompt for MFA when federating into an IAM role.

https://github.com/Versent/saml2aws

 

Now we are trying to reproduce this functionality on Okta. Saml2aws supports Okta as an option when configuring the tool, but it seems as though authentication is never successful when the app policy requires MFA. The error message is as follows:

 

Error authenticating to IdP.: error retrieving auth response: request for url: https://{org}.okta.com/api/v1/authn failed status: 401 Unauthorized

 

Only when the policy is "password only" does the federation complete.

 

I opened this issue on the app's github page to ask the same question: https://github.com/Versent/saml2aws/issues/1149

 

Has anybody successfully been able to utilize saml2aws and require MFA every time when federating into an IAM role? Alternatively, are there any other cli tools (MacOS terminal and Windows Powershell compatible) that accomplish this easily?

 

 

 

 


This question is closed.
Loading
saml2aws (AWS CLI tool) 401when app policy requires MFA