...
The command-line interface is a automation-friendly executable that orchestrates obtaining access tokens. Furthermore, it provides a number of execution options to improve the locality of change, and reduce efforts to call CXO user sync API.
To see the OpenAPI specification of the User Sync API, open <cxo-url>/public/swagger (example from CXO training environment) and search for users/synchronize
.
Command-line interface
The command-line interface (or CLI) provides the functionality of synchronizing the users of one or many CXO Applications with an external repository.
Prerequisite
The tool requires the .Net Core 36.1 0 runtime to be installed on the machine
Or soon .Net 8.0 runtime
Installation
The tool is distributed as a zip archive, simply unzip it in the desired location and it is ready to use.
...
You may run it from the installation folder by opening the command line and calling the executable: CXO.User.Synchronization.Client.CLI.exe
Running it in the following way will list all the options / parameters available../CXO.User.Synchronization.Client.CLI.exe
Parameters
Parameter | Short | Description |
---|---|---|
--cxoUrl | N/A | URL of CXO |
--idpUrl | N/A | URL of the CXO identity provider. |
--clientId | -c | Identity provider - client Id. See the Security section on how to obtain this value. |
--privateKey | -p | Identity provider - client private key. See the Security section on how to obtain this value. |
--input | -i | Path of the input file. See the Inputs section. |
--applicationsFile | -a | The file path to a list of applications to synchronize. |
--masterDatabaseConnectionString | -m | Connection string of the master database. Using this option all applications (from given master database) will be synchronized. If this option is set, (-a --applicationsFile) option should not be set. |
--filterApplications | -f | A comma-separated list of application |
--maxParallelism | -P | Default(1) . Represents the max number of applications to synchronize in parallel. This value should be at most equal to the amount of CXO instances available. |
--init | N/A | Initializes the input file and applicationsFile with an example text at the path specified to each parameter. |
Endpoints
As described in the Deployment section, the CLI interacts with CXO. For that reason, you need to provide CXO and IDP URLs using --cxoUrl and --idpUrl options, respectivelly.
...
CLI requires the list of users with their corresponding CXO user groups to be supplied as a json file. This input is mandatory, so no passing this file will result in an error. As for the file content, for each user, the following can be specified:
Field | Optional/Mandatory | Limitations |
---|---|---|
User name | Mandatory | unique, not null, at most 300 characters |
Full name | Optional | at most 2000 characters |
Optional | value email address format, at most 2000 characters | |
User groups | Mandatory | For each group: unique, not null, at most 300 characters |
Additionally, if supplied with (--applicationsFile, -a), another json file will specify which applications to synchronize. As for the file content, for each application, the following can be specified:
...
Open the Configurator > Configuration > Schedule.xml
Edit the cron-expression of the following jobs so that they are not run while the user synchronization is ongoing: UnreadConversationMessagesNotificationJob, EmailJob, screenShotsJobScreenshotsOnDemandJob, CleanUpJob
You can use a CRON expression editor to define a period when the services will not be running.
See example examples below on how to pause it between 2 AM and 4 AMLeave time for export jobs to complete before the user synchronization begins
...