Closed Ross-Y closed 10 months ago
Also a coma should be removed in line 1151, as if your password is Password01
and your OTP code is 987654
, the password field should look as follows: Password01987654
. With the coma it looks like Password01,987654
and obviously authentication fails.
I haven't seen any RADIUS authentication systems which would use a delimiter between a password and an OTP code. It doesn't mean they don't exist - but I guess it's just another bug.
In line 1146 and 1148, the variable
$logonBody
gets a powershell custom object converted into type json. That's why it will never work in line 1151, when you call a property of an object$logonBody.password
- since it is no longer an object, but a json text.A simple workaround would be to have some temporary object to convert from json, change the password and convert to json again:
https://github.com/cyberark/epv-api-scripts/blob/afafeb0af114330a822f2a7c045263b63f441294/Account%20Onboard%20Utility/Accounts_Onboard_Utility.ps1#L1145-L1152