Fortinet white logo
Fortinet white logo

Using command-line flags

Using command-line flags

The LDAP Sync Tool supports the following command-line flags that allow you to set configuration values, view user synchronization details, and more.

Command-line flags
Flag Description
--apitoken String. Sets the FortiDLP API access token.
--apiurl String. Sets the URL of your organization's FortiDLP Console.
--config

String. Sets the path to the configuration file. This is not required if you saved the configuration file in the same directory as the LDAP Sync Tool binary file and named it config.yaml.

Example

For example, on Windows, you could run
.\ldap-sync --config C:\Users\Sam\Documents\ldapconfig.yaml to specify that your configuration file is in your Documents folder.

--archivedeleted

The rule to automatically archive directory-deleted users when the directory is synced to FortiDLP.

Note

Before you enable this rule for the first time — either by using this flag or via the configuration file — you need to initialize the directory by performing a full sync to FortiDLP. See Creating the configuration file for details.

When this flag is used, deleted users will not be archived in Reveal if diffsync is included in the configuration file.

--printconfig Shows the configuration file in the CLI so it can be reviewed prior to syncing.
--dryrun Downloads users from your specified LDAP directory and shows their names in the CLI, but does not upload them to the FortiDLP Infrastructure.
--photosync Enables photo syncing for users' profile pictures in the FortiDLP Console.
--logs

String. Sets the file path to write logs to. These logs will contain the same output as displayed in the CLI.

Example

For example, on Windows, running .\ldap-sync --logs C:\Users\Sam\Documents\ldap-sync-log.txt would generate a log file called ldap-sync-log.txt in your Documents folder.

--maxretries Integer. Sets the maximum number of retries that can occur after a failure connecting to the FortiDLP Infrastructure or LDAP server, or syncing users.
--skiptls Skips certificate verification of the FortiDLP API.
--version Shows the LDAP Sync Tool software version.

Using command-line flags

Using command-line flags

The LDAP Sync Tool supports the following command-line flags that allow you to set configuration values, view user synchronization details, and more.

Command-line flags
Flag Description
--apitoken String. Sets the FortiDLP API access token.
--apiurl String. Sets the URL of your organization's FortiDLP Console.
--config

String. Sets the path to the configuration file. This is not required if you saved the configuration file in the same directory as the LDAP Sync Tool binary file and named it config.yaml.

Example

For example, on Windows, you could run
.\ldap-sync --config C:\Users\Sam\Documents\ldapconfig.yaml to specify that your configuration file is in your Documents folder.

--archivedeleted

The rule to automatically archive directory-deleted users when the directory is synced to FortiDLP.

Note

Before you enable this rule for the first time — either by using this flag or via the configuration file — you need to initialize the directory by performing a full sync to FortiDLP. See Creating the configuration file for details.

When this flag is used, deleted users will not be archived in Reveal if diffsync is included in the configuration file.

--printconfig Shows the configuration file in the CLI so it can be reviewed prior to syncing.
--dryrun Downloads users from your specified LDAP directory and shows their names in the CLI, but does not upload them to the FortiDLP Infrastructure.
--photosync Enables photo syncing for users' profile pictures in the FortiDLP Console.
--logs

String. Sets the file path to write logs to. These logs will contain the same output as displayed in the CLI.

Example

For example, on Windows, running .\ldap-sync --logs C:\Users\Sam\Documents\ldap-sync-log.txt would generate a log file called ldap-sync-log.txt in your Documents folder.

--maxretries Integer. Sets the maximum number of retries that can occur after a failure connecting to the FortiDLP Infrastructure or LDAP server, or syncing users.
--skiptls Skips certificate verification of the FortiDLP API.
--version Shows the LDAP Sync Tool software version.