Error authenticating to IdP.: page is missing saml assertion
Hi,
I am trying to login to AWS using saml2aws login however I am getting the following error message: Error authenticating to IdP.: page is missing saml assertion.
While investigating the HTML file from the response, this is what I get:

Could you please let me know how I can fix this?
Thank you.
Hmm, yeah seems like something has changed in the response from Google. It was working for me last week without a captcha, and today I get a captcha that doesn't work:
$ saml2aws --version
2.35.0
$ saml2aws login --verbose
Using IdP Account default to access GoogleApps ...
? Captcha ...
Open this link in a browser:
https://accounts.google.com/Captcha? ...
Error authenticating to IdP.: page is missing saml assertion
...
DEBU[0021] name: Page value: PasswordSeparationSignIn provider=googleapps
DEBU[0021] name: GALX value: <redacted> provider=googleapps
DEBU[0021] name: gxf value: <redacted> provider=googleapps
DEBU[0021] name: checkConnection value: youtube:930:1 provider=googleapps
DEBU[0021] name: continue value: https://accounts.google.com/o/saml2/initsso?idpid=<redacted> provider=googleapps
DEBU[0021] name: flowName value: WEB_SETUP_GLIF provider=googleapps
DEBU[0021] name: faa value: 1 provider=googleapps
DEBU[0021] name: hl value: en provider=googleapps
DEBU[0021] name: oauth value: 1 provider=googleapps
DEBU[0021] name: sarp value: 1 provider=googleapps
DEBU[0021] name: scc value: 1 provider=googleapps
DEBU[0021] name: ProfileInformation value: provider=googleapps
DEBU[0021] name: SessionState value: provider=googleapps
DEBU[0021] name: _utf8 value: ☃ provider=googleapps
DEBU[0021] name: bgresponse value: js_disabled provider=googleapps
DEBU[0021] name: Email value: <redacted> provider=googleapps
DEBU[0021] name: identifiertoken value: <redacted> provider=googleapps
DEBU[0021] name: signIn value: Next provider=googleapps
DEBU[0021] captchaURL: https://accounts.google.com/signin/v1/lookup provider=googleapps
DEBU[0021] HTTP Req URL="https://accounts.google.com/signin/v1/lookup?hl=en&loc=US" http=client method=POST
DEBU[0022] HTTP Res Status="200 OK" http=client
page is missing saml assertion
github.com/versent/saml2aws/v2/pkg/provider/googleapps.(*Client).Authenticate
github.com/versent/saml2aws/v2/pkg/provider/googleapps/googleapps.go:164
github.com/versent/saml2aws/v2/cmd/saml2aws/commands.Login
github.com/versent/saml2aws/v2/cmd/saml2aws/commands/login.go:105
main.main
./main.go:188
runtime.main
runtime/proc.go:255
runtime.goexit
runtime/asm_amd64.s:1581
Error authenticating to IdP.
github.com/versent/saml2aws/v2/cmd/saml2aws/commands.Login
github.com/versent/saml2aws/v2/cmd/saml2aws/commands/login.go:107
main.main
./main.go:188
runtime.main
runtime/proc.go:255
runtime.goexit
runtime/asm_amd64.s:1581
It is broken for me too, and none of the captchas that I am introducing seems to work.
Error authenticating to IdP.: page is missing saml assertion
Weirdly today I tested it again and now instead of asking for captcha it asked for sms token and it worked!
➜ git:(master) ✗ saml2aws login
Using IdP Account default to access GoogleApps https://accounts.google.com/o/saml2/initsso?idpid=XXX&spid=XXX&forceauthn=false
To use saved password just hit enter.
? Username XXXXXX
? Password
Authenticating as XXXX ...
? Enter SMS token: G- XXXX
? Please choose the role Account: aws (XXX) / Administrator
Selected role: XXX/Administrator
Requesting AWS credentials using SAML assertion.
Logged in as: XXXXXX
Your new access key pair has been stored in the AWS configuration.
Note that it will expire at 2022-06-27 22:11:09 +1000 AEST
Weirdly today I tested it again and now instead of asking for captcha it asked for sms token and it worked!
➜ git:(master) ✗ saml2aws login Using IdP Account default to access GoogleApps https://accounts.google.com/o/saml2/initsso?idpid=XXX&spid=XXX&forceauthn=false To use saved password just hit enter. ? Username XXXXXX ? Password Authenticating as XXXX ... ? Enter SMS token: G- XXXX ? Please choose the role Account: aws (XXX) / Administrator Selected role: XXX/Administrator Requesting AWS credentials using SAML assertion. Logged in as: XXXXXX Your new access key pair has been stored in the AWS configuration. Note that it will expire at 2022-06-27 22:11:09 +1000 AEST
I just tested it from my end, and it seems to be working again
Works for me too now. How weird :thinking:
Several persons reported this exact issue today (including myself). It's back!
We can report the same issue and our workaround is to use the Browser mode instead of the GoogleApps mode by changing your configuration:
sed -i 's/GoogleApps/Browser/g' ~/.saml2aws
The previous fix by @jmctune doesn't seem to work anymore: https://github.com/Versent/saml2aws/commit/b044230ac8a2ba5544ecf6927a4947a364910cef
We can report the same issue and our workaround is to use the
Browsermode instead of theGoogleAppsmode by changing your configuration:sed -i 's/GoogleApps/Browser/g' ~/.saml2awsThe previous fix by @jmctune doesn't seem to work anymore: b044230
@stephanschielke thank you so much! works for me, saved my life too.
This is happening for me too, but just started today. Hopefully there's another way to solve this besides using the browser to authenticate each time.
See if https://github.com/Versent/saml2aws/pull/850 resolves the problem for those that are experiencing this.
Hi @jmctune, I locally built the fix in #850. That didn't fix this issue:
Error authenticating to IdP.: page is missing saml assertion
▶ cat ~/.saml2aws
[default]
app_id =
url = https://accounts.google.com/o/saml2/initsso?idpid=<id_provider>&spid=<service_provider_id>&forceauthn=false
username = [email protected]
provider = GoogleApps
mfa = Auto
aws_urn = urn:amazon:webservices
aws_session_duration = 7200
aws_profile = saml
I get a Captcha challenge which never returns a positive result.
The workaround - which is slow and not elegant - is:
saml2aws configure
? Please choose a provider: Browser
I was just in the process of rolling this out to the team when it broke. Given the Google authentication workflow is out of the control of this project, it is always going to be a risk and it could break connectivity for the team if it stops working
I think the Browser based solution is going to be the best solution for supportability, so I will be using this going forward.