Skip to content

CSV templates

Harbor OnboardRole: operatorDescribes Onboard 0.58.0

Harbor Onboard creates safes and onboards accounts in bulk from CSV files. Every row is validated before the first call to CyberArk, and a bad file reports every bad row at once. Get a template pre-filled from your own naming standard:

Terminal window
New-HarborImportTemplate -Type Safe -OutputPath .\safes.csv
New-HarborImportTemplate -Type Account -OutputPath .\accounts.csv

The shipped templates are in the module’s Templates folder. The console’s Create Safe page imports the same files (up to 16 MB).

App,Technology,SubType,AccountType,SafeType,Environment,RetrieveAccounts,ManagingCpm,Description,Owner,CmdbRef,TicketRef,Name,ExceptionReason
PAS,SRV,WIN,DA,shared-managed,P,FALSE,,SAP Windows domain admins,team@example.com,CI-00123,CHG0012345,,
INV,DB,SQL,SA,svc-managed,T,TRUE,PasswordManager,Inventory SQL service accounts,owner@example.com,CI-00456,SR0067890,,
,,,,shared-unmanaged,,,,Governed exception example,finance@example.com,,CHG0090001,Legacy Finance Vault,Rename breaks batch jobs -- CAB approved
Column Required Meaning
App, Technology, SubType, AccountType, Environment For shared and service safes The name segments APP, TECH, SUB, ACT, ENV. The derived letters and the organisation code are added by Harbor.
SafeType Always shared-managed, shared-unmanaged, svc-managed, svc-unmanaged or personal.
RetrieveAccounts For shared and service safes TRUE or FALSE, always written out, never blank. Sets the optional retrieve permission of the end-user group.
ManagingCpm No The managing CPM. Blank: the profile’s defaultManagingCpm, then safe-defaults.json.
Description No The safe description. Harbor adds the safe’s unique ID to it.
Owner No The owner, stored in the register. For a personal safe, the user added as its owner; blank uses the SamAccountName.
CmdbRef, TicketRef No Traceability: stored in the register and in the safe description.
SamAccountName Personal safes Add this column for personal rows: the user’s sAMAccountName. The name becomes I-<CPM location>-<SamAccountName>; the managing CPM must have a location.
Name, ExceptionReason For exception rows A governed naming exception: the raw safe name in Name, a mandatory reason in ExceptionReason, and the segment columns left empty. Not for personal safes.

The unique ID is generated: it is not a column.

  • the required columns exist;
  • every name follows the naming standard and fits 28 characters (an exception name must be one CyberArk accepts);
  • RetrieveAccounts is TRUE or FALSE;
  • personal rows have a SamAccountName and a managing CPM with a location;
  • no name appears twice in the file;
  • your policy rules (a block rule stops the row).
SafeName,PlatformId,Username,Address,AccountName,SecretType,Notes,TicketRef
AB-PAS-SRV-WIN-DA-I-M-P,WinDomain,svc-sapapp,example.com,,,,CHG0012345
AB-INV-DB-SQL-SA-S-M-T,UnixSSH,svc-hrapp,linuxhost01.example.com,,,,SR0067890
Column Required Meaning
SafeName Yes The safe to add the account to. It must exist.
PlatformId Yes The CyberArk platform id, for example WinDomain or UnixSSH.
Username Yes The account’s user name.
Address No The host or domain.
AccountName No The CyberArk account name; blank lets CyberArk name it.
SecretType No The secret type, for example password or key.
Notes No Free text.
TicketRef No Traceability, stored in the account register.

There is no password column, by design: the CPM sets the secret when it reconciles the account. Onboarding to a platform without reconcile configured leaves an account without a usable secret; Add-PAMAccount warns about it.

Rows are checked first for the required columns, blanks, and duplicate user + address + safe rows.

Terminal window
Import-PAMSafes -Path .\safes.csv -DryRun # validate and plan, write nothing
Import-PAMSafes -Path .\safes.csv -ReportPath .\reports\run.csv # create; per-row results for auditors
Import-PAMAccounts -Path .\accounts.csv -DryRun
Import-PAMAccounts -Path .\accounts.csv -ReportPath .\reports\accounts-run.csv

A safe or account that already exists is Skipped; other failures are Failed, and the run continues. The result counts Created, Skipped and Failed. A report path ending in .html writes a styled HTML report instead of CSV.

CSV exports from Harbor neutralise cells that start with =, +, -, @, a tab or a carriage return, so a spreadsheet does not run them as formulas.

Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.