For some reason, our FreeIPA server is starting to return HTTP error 400 Bad Request during login.
We found it is expecting the Referer header to be set in the the login request.
I managed to fix your code by adding the following code to Get-FreeIPAAPIAuthenticationCookie:
$params.add('Headers', @{'Referer' = "$($global:FreeIPAAPIServerConfig.ServerURL)/ipa/session/login_password"})
For some reason, our FreeIPA server is starting to return HTTP error 400 Bad Request during login. We found it is expecting the Referer header to be set in the the login request. I managed to fix your code by adding the following code to
Get-FreeIPAAPIAuthenticationCookie
:$params.add('Headers', @{'Referer' = "$($global:FreeIPAAPIServerConfig.ServerURL)/ipa/session/login_password"})