pspete / psPAS

PowerShell module for CyberArk Privileged Access Security REST API
https://pspas.pspete.dev
MIT License
295 stars 91 forks source link

Get-PASAccountDetail -id $Acc.id takes forever #538

Closed JCallPut closed 4 months ago

JCallPut commented 4 months ago

Getting account details using following snippet: $testAccDetails=Get-PASAccountDetail -id $Acc.id

$Acc is actual account object.

Problem is, each run of this code takes between 1 and 6 minutes, even though similar actions via PVWA are in seconds.

Pinpointed this issue to the following psPAS code section: $APIResponse = Invoke-WebRequest @PSBoundParameters -ErrorAction Stop

Tried to add $ProgressPreference = 'SilentlyContinue' right before invoke-webrequest to no avail.

Code works, but unacceptably slow. Unrelated to backend performance.

Expected behavior Performance matching or exceeding PVWA.

Your Environment

pspete commented 4 months ago

https://pspas.pspete.dev/docs/troubleshooting/#manual-api-command-testing Follow the troubleshooting guide to confirm if this persists outside the module.

JCallPut commented 4 months ago

Running same code against DEV environment returned result in sub-second, so not a code issue.

pspete commented 4 months ago

So sounds like an environment issue / not related to the module

pspete commented 4 months ago

No recent update, closing as does not appear related to the module code