pspete / psPAS

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

Running New-PASRequest with MultipleAccess $true doesn't work as expected. #216

Closed jaapvstr closed 4 years ago

jaapvstr commented 5 years ago

Describe the issue Running New-PASRequest with MultipleAccess $true doesn't work as expected. I have a gut feeling boolean values are not working as expected.

To Reproduce Steps to reproduce the behavior:

  1. Run New-PASRequest -AccountId $AccountID -Reason "Please Approve" -MultipleAccess $true -FromDate $FromDate -ToDate $ToDate
  2. Check the request
  3. It shows up as a OneTime access request

Expected behavior It should show up as a multiple time access request

Screenshots & Console Output When I catch the request I get: -URI: https://pwv.intranet/PasswordVault/API/MyRequests -Method: POST -Body: { "ToDate": "1571932440", "AccountId": "4664_4", "FromDate": "1571846040", "Reason": "Please Approve", "MultipleAccess": true } -WebSession: Microsoft.PowerShell.Commands.WebRequestSession -ContentType: application/json -UseBasicParsing: True

Your Environment

Additional context I tried to change the request to manually send $true quoted, e.g.: "MultipleAccess": "true", but it still ends up being an OneTime access request.

jaapvstr commented 5 years ago

I just found the solution for this in the Arcsite documentation. It's a bit ambigious on this parameter, but changing the -MultipleAccess $true parameter to -MultipleAccessRequired $true solved the issue.

pspete commented 4 years ago

Thanks for the report @jaapvstr - I'll get this worked into the next psPAS update

pspete commented 4 years ago

Fixed in version 3.3.88 on the master branch & published to the PowerShell Gallery.