- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
07-14-2023 11:32 AM
Can anyone let me know how to generate the reports of Safe where no CPM are assigned?
What are the ways to generate the reports of those safe where none of CPM assigned to those?
07-15-2023 01:07 AM
What kind of information are you looking for
07-15-2023 01:09 AM
This can be obtained via rest api
07-15-2023 01:09 AM
https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/13.2/en/Content/PASIMP/ReportsInPrivateArkClient.htm
07-16-2023 08:23 PM
HI,
We can get this info via Restapi..(Get All Safes). Apply filter assigned CPM options post report generation..
Note: Make sure to run restapi with any user having Auditor Role.
Here the script you can use with CyberArk Authentication.
#****************CyberArk restapi Auth***************************
$BaseUrl = Read-Host "Enter the PVWA BaseURL Address eg: pvwa.company.com" ## Insert PVWA server based address
$apiusercred = Get-Credential ##Pop-up to enter Username and Password
$Restapi_username = $apiusercred.Username
$Restapi_password = $apiusercred.GetNetworkCredential().Password
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$body = "{`n `"username`": `"$Restapi_username`",`n `"password`": `"$Restapi_password`",`n `"concurrentSession`": `"true`"`n}"
$response = Invoke-RestMethod "https://$BaseUrl/PasswordVault/api/Auth/cyberark/logon" -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
$VTokenVaule = $response
#**********************************Get All Safes Details********************************************************
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$headers.Add("Authorization",$VTokenVaule)
$response = Invoke-RestMethod "https://$BaseUrl/PasswordVault/WebServices/PIMServices.svc/Safes/" -Method 'Get' -Headers $CGheaders
$response | ConvertTo-Json
$response.GetSafesSlashResult | export-csv -path "C:\Temp\AllSafesDetails.csv"
Write-Host "Report is Generated and stored under TEMP Folder with Name - AllSafesDetails" -ForegroundColor Green
07-16-2023 08:23 PM
HI,
We can get this info via Restapi..(Get All Safes). Apply filter assigned CPM options post report generation..
Note: Make sure to run restapi with any user having Auditor Role.
Here the script you can use with CyberArk Authentication.
#****************CyberArk restapi Auth***************************
$BaseUrl = Read-Host "Enter the PVWA BaseURL Address eg: pvwa.company.com" ## Insert PVWA server based address
$apiusercred = Get-Credential ##Pop-up to enter Username and Password
$Restapi_username = $apiusercred.Username
$Restapi_password = $apiusercred.GetNetworkCredential().Password
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$body = "{`n `"username`": `"$Restapi_username`",`n `"password`": `"$Restapi_password`",`n `"concurrentSession`": `"true`"`n}"
$response = Invoke-RestMethod "https://$BaseUrl/PasswordVault/api/Auth/cyberark/logon" -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
$VTokenVaule = $response
#**********************************Get All Safes Details********************************************************
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$headers.Add("Authorization",$VTokenVaule)
$response = Invoke-RestMethod "https://$BaseUrl/PasswordVault/WebServices/PIMServices.svc/Safes/" -Method 'Get' -Headers $CGheaders
$response | ConvertTo-Json
$response.GetSafesSlashResult | export-csv -path "C:\Temp\AllSafesDetails.csv"
Write-Host "Report is Generated and stored under TEMP Folder with Name - AllSafesDetails" -ForegroundColor Green
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!

