psPAS icon indicating copy to clipboard operation
psPAS copied to clipboard

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

Open KimChr opened this issue 1 year ago • 1 comments

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

To Reproduce Steps to reproduce the behavior:

  1. Get-PASUser -id <ID of user that do not have GUI in authorized interfaces> | 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

  • PowerShell Version: 5.1
  • psPAS Version: 5.2.59 (but also missing in 5.3.69)
  • CyberArk Version: 12.2

KimChr avatar Aug 10 '22 11:08 KimChr

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 avatar Aug 13 '22 00:08 pspete

GUI added to New-PASUser & Set-PASUser

pspete avatar Aug 17 '22 00:08 pspete