saml2aws: Error authenticating to IdP.: error loading first page: failed to build login form data: could not find any forms matching the provided IDs

Hi Everyone,

I keep on getting this error when trying to login using Google IdP.

Error authenticating to IdP.: error loading first page: failed to build login form data: could not find any forms matching the provided IDs.

Can you please assist? There is no clear documentation on this or how this is suppose to be setup.

Kind Regards Eddy

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 3
  • Comments: 20

Most upvoted comments

I believe this is due to Google requiring JavaScript for some peoples logins - it seems to differ from person to person, even within the same organisation. The login process uses a headless browser without JavaScript, so Google displays an error message and saml2aws can’t find the next form to fill out.

A potential workaround is to change the provider to Browser in your ~/.saml2aws configuration file, which then uses a chromium browser for login, which can handle JavaScript. It’s not as nice as the pure CLI option, but it works.

Step by step for the “Browser” workaround for folks on Mac:

  1. Go to the /Users/your user name folder on your Mac. Do a ls -latr to see the hidden .saml2aws file
  2. Run: vi .saml2aws
  3. Change provider = GoogleApps --> provider = Browser. Save and exit (wq!)
  4. Run saml2aws login again. It’ll download chromium and then you’ll be prompted to login via your browser from next time onwards.

My colleagues and I are getting the same intermittent issue on our Ubuntu 22.04.4 LTS laptops - saml2aws login doesn’t work with provider=GoogleApps in the config. Is there a CLI fix for this issue? I’d really rather log in from CLI instead of Chromium which is being opened each time since I’ve had to switch to provider=Browser…

I was still getting an error after changing the provider to Browser: error building IdP client: Invalid provider: Browser

it got fixed by updating saml2aws, in the case of Mac OS:

brew install saml2aws

Hi Everyone,

What worked for me was changing the provider parameter in ~/.saml2aws from GoogleApps to Browser. After making this change, I executed the following command: saml2aws login --download-browser-driver. This will download the necessary browser plugin.

My OS: Ubuntu 22.04

I just updated using brew update and brew upgrade saml2aws and it gave me version 2.35.0, which appears to have this fix.

I changed my ~/.saml2aws back to provider = GoogleApps and I can now successfully login again without using the additional Chromium browser.

My saml2aws version is 2.36.16 but still happening

is there any update on when version 2.35.0 will be published to choco?

Oh, I found next version in this repository and that includes solution of this problem ❤️. https://github.com/Versent/saml2aws/releases/tag/v2.35.0 (include #806 ) That released a few minutes ago.

Maybe this will release on brew soon 🚀

This app looks like find a form labelled like “#challenge” from config url. However, today google page provides form labelled by “#f”.

I believe this is due to Google requiring JavaScript for some peoples logins - it seems to differ from person to person, even within the same organisation. The login process uses a headless browser without JavaScript, so Google displays an error message and saml2aws can’t find the next form to fill out.

A potential workaround is to change the provider to Browser in your ~/.saml2aws configuration file, which then uses a chromium browser for login, which can handle JavaScript. It’s not as nice as the pure CLI option, but it works.

This workaround was good for me.

Still happening here too.

Still happening in 2024, is there any fix for that? Seems like something has changed in Google APIs, and maybe the saml2aws cli should adapt.