...
This code-snippet would will automatically synchronize the applications and users from the two input json files.
Troubleshooting
Speed of execution
The time it takes to synchronize the users (i.e. run the command line) is proportional to the number of users in your CXO applications.
In CXO, each action related to the user (adding/updating/removing) can cause a side effect in the system. Examples are updating the storyboard assignments and logging changes in the audit trail. The most time consuming operation is removing a user, then adding a user, and the fastest of all operations is updating a user.
If you experience slow performance, try the following:
Run the command line interface more often to make sure not too many users are added / removed.
In the web application configuration (web.config file), in httpRuntime, the executionTimeout value can be increased