Open battlebudy opened 5 months ago
Seems like I did change this code in offline copy already. This is related to changes Microsoft did in if I recall Server 2022 in a recent patch. However, we actually moved this functionality natively in product if you are on Secret Server Cloud.
Heartbeat Fails and getting "Authentication Failed. Unknown error occurred. Does the user exist? "when
$responce
is nullAfter a lot of testing and running this outside of Secret Server I found when running
$response = Invoke-WebRequest -Uri $authUrl -Method POST -headers $headers -Body $body
the
$response
would be null causing$errormessage
to also be null thus triggering the final else statementwhen running just
Invoke-WebRequest -Uri $authUrl -Method POST -headers $headers -Body $body
alone and outside of a Variable I was presented with the following errorAdding
-UseBasicParsing
to the request fixed the issue$response = Invoke-WebRequest -Uri $authUrl -Method POST -headers $headers -Body $body -UseBasicParsing