- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.
06-18-2021 12:18 AM
06-18-2021 01:50 AM
As far as DAP: My understanding is as follows but I'm not sure..
Generally, login API services will return the response as JSON body. There should be a Date field (ex: Date:"Fri, 18 Jun 2021 08:15:44 GMT"). I've taken this Date from DAP Access Token and this will be valid for 8 minutes.. And this will be automatically refreshed if there is any subsequent request within these 8 minutes time frames.
Thoughts?
06-18-2021 02:14 AM
I am using cyberark login as auth method and just get the session token ,no other info.
I want to make an api call to see if the token is valid
06-18-2021 09:10 AM
You can send a GET request using the token to one of the below endpoints:
/api/LoginsInfo
/WebServices/PIMServices.svc/User
/WebServices/PIMServices.svc/Server
06-22-2021 10:49 AM
You could do this in powershell. Just replace baseURL,username,password. It should do the task.
$URL_CyberArkLogon = "https://<baseURL>/passwordvault/api/auth/cyberark/Logon"
$logonBody = @{ username=<$rstusername>;password=<$rstpassword> }
$logonToken = ""
$logonBody = $logonBody | ConvertTo-Json
$URL_CyberArkLogoff = "https://<baseURL>/passwordvault/api/auth/Logoff"
$logonHeader = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
try{
# Logon
$logonToken = Invoke-RestMethod -Method Post -Uri $URL_CyberArkLogon -Body $logonBody -ContentType "application/json"
}
catch
{
Write-Host -ForegroundColor Red $_.Exception.Response.StatusDescription
$logonToken = ""
}
If ($logonToken -eq "")
{
Write-Host -ForegroundColor Red "Logon Token is Empty - Cannot login"
return
}
else
{write-host "Token value: $logontoken"}
$logonHeader.Add("Authorization", $logonToken)
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!

