Open zjorz opened 8 months ago
I fixed it myself...obviously there is a bug as the body is not used at all. In my case after fixing it, I made a mistake with the fort of the body. long story short, here is the solution
$headers = @{
"Content-Type" = "application/json; charset=utf-8"
"User-Agent" = "<WHATEVER YOUR USER AGENT IS>"
}
$body = @{
"ctx" = $config.sProofUpAuthState # sCtx appears not to exist in the $config
"flowToken" = $config.sFT
"canary" = $config.canary
}
$response = Invoke-WebRequest2 -Uri $url -Method POST -Headers $headers -Body $body -WebSession $loginSession -MaximumRedirection 0 -ErrorAction SilentlyContinue
with these changes the "ConvergedProofUpRedirect" now works
the $body variable is defined but it appears NOT to be used in the line "$response = Invoke-WebRequest2....."
I have tried to fix that with $response = Invoke-WebRequest2 -Uri $url -Method POST -Headers $headers -Body $body -ContentType "application/json; charset=UTF-8" -WebSession $loginSession -MaximumRedirection 0 -ErrorAction SilentlyContinue
I keep getting the error: AADSTS90100: Ctx Parameter Is Empty Or Not Valid.
I have used dev tools and I see it doing exactly what I specify above, still it fails. Wondering why, but not able to understand. You guys know why?