pspete / psPAS

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

New-PASSession fails on MacOS with -IdentityUser for ISS #490

Closed walidhammad closed 7 months ago

walidhammad commented 9 months ago

Describe the issue After resolving the issue with temp on MacOS with IdentityCommand module https://github.com/pspete/IdentityCommand/issues/5#issue-1919945562, I now get an error for New-PASSession

Expected behavior I expect to be able to finish authenticating to identity services and login to the vault

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


$ New-PASSession -Credential $pcloudlogin -IdentityTenantURL https://xyz.id.cyberark.cloud -PrivilegeCloudURL https://abc.privilegecloud.cyberark.cloud -IdentityUser -Verbose
VERBOSE: Performing the operation "Logon" on target "https://xyz.id.cyberark.cloud".

Challenge Mechanisms
Select Mechanism
[M] Mobile Authenticator  [E] Email...   [F] FIDO2 Security Key  [Q] QR Code  [?] Help (default is "M"): m
Sent Mobile Authenticator request to your device. Please follow the instructions to proceed with authentication or enter verification code here.
InvalidOperation:
Line |
 754 |  … et-Variable -Name WebSession -Value $($PSItem.GetWebSession()) -Scope …
     |                                          ~~~~~~~~~~~~~~~~~~~~~~~
     | Method invocation failed because [IdCmd.ID.Session] does not contain a method named 'GetWebSession'.
InvalidOperation:
Line |
 789 |  …             $Script:WebSession.Headers['Authorization'] = [string]$Cy …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot index into a null array.
VERBOSE: HTTP/1.1 GET with 0-byte payload
VERBOSE: received 95-byte response of content type text/html

Your Environment Include relevant details about your environment

PowerShell Version: 7.3.6 psPAS Version: 6.0.4 IdentityCommand Version: 0.1.40 CyberArk Version: 13.2.0

pspete commented 9 months ago

Potentially still something specific to IdentityCommand: pspete/IdentityCommand#5 (the error in psPAS is due to something awry in the IdentityCommand output)

pspete commented 7 months ago

No update via pspete/IdentityCommand#5 . Assumed fixed.