MS-LUF / Manage-FreeIPA

Add few PowerShell cmdlets to manage a FreeIPA server through its JSONRPC web API - https://github.com/freeipa/freeipa
7 stars 2 forks source link

FreeIPA HTTP error 400 Bad Request during login #3

Open lva opened 5 months ago

lva commented 5 months ago

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"})

KisSsArt commented 3 months ago

Thank you! Its work =)