Closed sudipto-roychoudhury closed 1 year ago
The error message is quite clear - connectionNumber
is not part of the ParameterSet being used.
The parameter description shows that it belongs to the Gen1
& Gen1Radius
parameter sets. - you probably just need to additionally specify the -UseGen1API
parameter.
Consider referring to your versions product documentation and investigate the Gen 2 API options available to you, the reference links provided are quite dated.
Thanks @pspete again for nudging me in the right direction. Found this bool parameter "concurrentSession" in the API docs which when set to "true" gives me the ability to run psPAS cmdlets with same user concurrently.
New-PASSession -Credential $CybLocalreds -BaseURI "https://PVWA" -concurrentSession $true
Describe the issue While trying to call New-PASSession using local CyberArk creds along with the "-connectionNumber" parameter it errors out with message :
New-PASSession : Parameter set cannot be resolved using the specified named parameters.
To Reproduce Steps to reproduce the behavior:
Expected behavior Successfull Authentication expected using 'connectionNumber' argument for the API.
Screenshots & Console Output If applicable, add screenshots and/or console output to help explain your problem.
New-PASSession : Parameter set cannot be resolved using the specified named parameters
Your Environment Include relevant details about your environment
Additional context Trying to resolve this error when a Powershell script is run to call CyberArk REST API Invoke-PASRestMethod : [401] User was automatically logged off from Vault (Diagnostic information: 540).
Ref1 : https://cyberark-customers.force.com/s/question/0D52J00006k9BOySAM/why-i-am-getting-errormessage-itacm040s-user-was-automatically-logged-off-from-vault-diagnostic-information-540logoff-from-the-vault-and-logon-again
Ref2 : https://cyberarkdocu.azurewebsites.net/Product-Doc/OnlineHelp/PAS/Latest/en/Content/SDK/CyberArkAuthentication-Logon.htm