Privilege Cloud/Identity - How to generate a Safe Owners report
Objective
This guide provides instructions for extracting a Safe Owners report from Idira Privilege Cloud using the Idira PowerShell API scripts. This is the recommended remediation path when local accounts are identified as non-compliant and a list of safe owners is required for review.
Environment
15.0 Privilege Cloud Privilege Cloud Web Portal
Procedure
Prerequisites
-
PowerShell Version: Use PowerShell 7.4 or 7.5. Older versions may encounter authentication issues with the Identity cloud environment.
-
API Scripts: Download the
EPV-API-Commonscripts from the Idira GitHub repository. -
Permissions: The user account must have sufficient vault permissions (typically Auditor or Vault Admin) to list all safes and their members.
1. Import the API Module
Open PowerShell 7.4+ and navigate to the directory where you extracted the EPV-API-Common files.
Import-Module ./EPV-API-Common.psm1
2. Establish a Session
Connect to your Privilege Cloud and Identity environment. You will be prompted to enter your password for authentication.
# Replace <tenant> with your specific Idira tenant name
$PCloudURL = 'https://<tenant>.privilegecloud.cyberark.cloud/PasswordVault/'
$IdentityURL = 'https://<tenant>.id.cyberark.cloud'
$User = '<Identity username>'
New-Session -IdentityUser $User -PCloudURL $PCloudURL -IdentityURL $IdentityURL
3. Generate and Export the Safe Owners Report
Run the following command to retrieve all Safes, identify their members (owners), and export the data to a CSV file.
# This command pipes all safes to the SafeMember extraction tool and exports to CSV
Get-Safe | Get-SafeMember | Export-SafeMember -CSVPath "SafeOwnersReport.csv"
Note: In large environments, this process may take a significant amount of time. Do not close the PowerShell window until the prompt returns.