cyberark / epv-api-scripts

These API scripts enable CyberArk users to automate privileged account management task like account creation, user management, and more.
https://www.cyberark.com/best
Apache License 2.0
203 stars 176 forks source link

Unable to use API's on Privilege Cloud #313

Closed prayi closed 1 year ago

prayi commented 1 year ago

Hi Team,

I am trying to test the scripts and I am getting below error. Any help would be appreciated. Below are few info: Version : 12.6 Product: Privilege Cloud (SaaS) Trying to run as LDAP authentication Error: [ERROR] Error Logging on. Error: Source:; Message: Get-LogonHeader: Internal Server Error ->Source:Microsoft.PowerShell.Commands.Utility; Message: The remote server returned an error: (500) Internal Server Error.

prayi commented 1 year ago

Hi Team -We have Privilege Cloud as shared service and running 12.6 version. Attached the error message for your reference. Any help is appreciated. image

bab29 commented 1 year ago

Privilege Cloud URL for REST is "https://.privilegecloud.cyberark.cloud/PasswordVault/ " which is different format then on-prem

prayi commented 1 year ago

Hi @bab29 - I tried with Privilege Cloud URL and getting attached error. Even i tried with account which exist in Identity portal but no luck. APIError

bab29 commented 1 year ago

If your PCloud instance is in SharedServices then you can not use a auth type of LDAP. You will need to pass the logonToken.

You can review https://github.com/cyberark/epv-api-scripts/tree/main/Identity%20Authentication on how to generate a logonToken.