pspete / psPAS

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

Get-PASAccount Now requires 11.2 to use Gen2API. Docs say 10.4+ is required #455

Closed jbalcorn closed 1 year ago

jbalcorn commented 1 year ago

Describe the issue Using Get-PASAccount with -search parameter against v11.1 vault results in "Gen2API requires 11.2". Docs at PSPas.pspete.dev and Cyberark both say Gen2 search should work with 11.1

To Reproduce Steps to reproduce the behavior:

  1. Run Get-PASAccount -search xx against 11.1 vault
  2. Profit!

Expected behavior Should return result as search parameters is supported on 11.1

Screenshots & Console Output If applicable, add screenshots and/or console output to help explain your problem.

PS > $VAAccounts = Get-PASAccount -Search "VA" -SearchType startswith

CyberArk 11.1.0 does not meet the minimum version requirement of 11.2 for Get-PASAccount (using ParameterSet: Gen2Query)
At line:73 char:6
+ ...             Throw "CyberArk $ExternalVersion does not meet the minimu ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (CyberArk 11.1.0...Set: Gen2Query):String) [], RuntimeException
    + FullyQualifiedErrorId : CyberArk 11.1.0 does not meet the minimum version requirement of 11.2 for Get-PASAccount (using ParameterSet: Gen2Query)

Your Environment Include relevant details about your environment

Additional context image

pspete commented 1 year ago

Unfortunately, that's a mistake in the docs. The searchType parameter is relevant for 11.2+, detailed here in the CHANGELOG & ReleaseNotes.

Will correct the Get-PASAccount command documentation for the next release.

Many thanks for highlighting 🙏🏼

jbalcorn commented 1 year ago

Ah. I see. Even though the API has 'search', it's actually a list of keywords.

Well, we're doing our 12 upgrade in May :-)

pspete commented 1 year ago

you can use the search parameter in any version higher than 10.4

searchtype requires minimum version of 11.2 modificationTime requires minimum version of 11.4 savedFilter requires minimum version of 12.6