pspete / psPAS

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

Set-PASUser - "GUI" is not included in ValidateSet, in unAuthorizedInterfaces parameter #405

Closed KimChr closed 1 year ago

KimChr commented 1 year ago

In Set-PASUser, the parameter unAuthorizedInterfaces do not include "GUI" in ValidateSet.

To Reproduce Steps to reproduce the behavior:

  1. Get-PASUser -id | Set-PASUser

Screenshots & Console Output image

PS C:\Data> get-pasuser -id 519 | set-pasuser
Set-PASUser : Cannot validate argument on parameter 'unAuthorizedInterfaces'. The argument "GUI" does not belong to
the set
"PIMSU,PSM,PSMP,PVWA,WINCLIENT,PTA,PACLI,NAPI,XAPI,HTTPGW,EVD,PIMSu,AIMApp,CPM,PVWAApp,PSMApp,AppPrv,AIMApp,PSMPApp"
specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.
At line:1 char:23
+ get-pasuser -id 519 | set-pasuser
+                       ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (@{enableUser=Fa...[]; location=\}:PSObject) [Set-PASUser], ParameterBindin
   gValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Set-PASUser

Your Environment Include relevant details about your environment

pspete commented 1 year ago

Thanks for the report @KimChr The current code is based on the listed values in documentation here, which does not include GUI. GUI would be a valid value though, so no issue adding it in. We can get it into the next release 👍

pspete commented 1 year ago

GUI added to New-PASUser & Set-PASUser