- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
03-27-2024 07:20 AM
We're attempting to use python to log into CyberArk via PingOne (SSO). We're able to log into https://mytenant.id.cyberark.cloud/my and land on the identity page using our api in our script, but no other areas. We need to be able to go from Identity to Privilage cloud using APIs in our script so we can manage safes and accounts using the scripts.
Is there an SDK that gives us the ability to use PingOne for API calls to https://mytenant.id.cyberark.cloud/ and to availity.cyberark.cloud? If not, can you please tell us how the authentication is being handled between web pages? We've tried using the session cookies and monitoring the headers for keys, but don't see anything that looks like it's handling authentication.
03-27-2024 11:25 AM
Each service in 'Shared Services' has its own URL. Can you redirect to https://<subdomain>.cyberark.cloud/privilegecloud after authenticating?
The typical approach with Shared Services API authentication is to retrieve a bearer token from Identity that can then be used in the authorization header for additional API calls. You could also create an OAuth2 server in Identity to handle API authentication with the client_credentials flow.
Refer to the documentation here for API authentication to Shared Services: https://docs.cyberark.com/privilege-cloud-shared-services/Latest/en/Content/ISPSS/ISPSS-API-Authentication.htm
Many customers also use the Identity Authentication script available on GitHub here: https://github.com/cyberark/epv-api-scripts/tree/main/Identity%20Authentication
That script will return the token you need to pass in the next API requests.
There are many other considerations that apply here, especially regarding the security of the secret for the API user, so please also review the CyberArk documentation. More details for everything above can be found here:
https://cyberark.my.site.com/s/article/Privilege-Cloud-Shared-Services-Automate-with-REST-API-PowerShell
03-27-2024 11:34 AM
An API authentication guide is documented here: Authentication quick start | CyberArk Docs
To use an authenticated Identity session to administer Privilege Cloud with the API, you need to create a Authorization Bearer token containing the Auth token value received upon authenticating to Identity, and include this in the header of your requests.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

