Skip to content
Try For Free

Modify a Usersync Configuration Offline

This tutorial explains how to download an existing User sync connector configuration via REST, how to modify it and upload it back again via REST.
That way you could re-use parts of existing configurations, i.e. on a staging server, without creating everything again by hand.
Normally, this only makes sense, if you've added a lot of transformation rules across the config.

The steps below are intended for users who are familiar with REST and JSON, please contact our support, if you have any doubts.
Changing a configuration that way should be done with good care.

  1. Find the User sync connector ID by clicking on the edit button first, the address bar will reveal that ID then, i.e. https://<basurl>/plugins/servlet/de.resolution.usersync/admin/editconnector?id=4

  2. GET the connector configuration, i.e. with Postman. The URL to retrieve the config looks like this, with the connector ID at the end: https://<basurl>/rest/samlsso-admin/1.0/usersync/connector/4

    1. Use a local user and password (or API Token) with admin permissions for the Basic Auth. REST doesn't work with SAML

      image2020-11-11_12-23-35.png

  3. Extract the configuration from the response

    1. not everything in the response from the call above is the configuration, you only need to preserve the configuration node of the JSON response

    2. We recommend pasting the response to a config.json file and open it in a text editor like Notepad++ or any other editor which highlights opening and closing brackets

    3. the below example shows the part which needs to be extracted, the value of the configuration field, including the curly brackets

      1. some child nodes have been collapsed for better readability

        image2020-11-11_12-38-26.png



  4. Copy that part, paste it to a new file and edit it as required

    1. in the sample below, I've changed the connector name and added two additional transformations for the username mapping of the connector

      image2020-11-11_12-24-59.png



  5. Copy the edited configuration and paste it back to Postman...

    1. ... into the Body tab with the radio button at "raw" and As JSON

    2. change the request method to PUT and press send

      image2020-11-11_12-25-49.png



    3. you should get a 200 OK Result and see the complete response again 

      image2020-11-11_12-37-6.png
    4. checking the User sync connector via the UI after refreshing the page should reflect the changes

      image2020-11-11_12-21-13.png



Re-Use the Connector Configuration

  1. Create a new Connector (you don't need to start any configuration)

    1. new_connector
      new_connector
      1. Note the new Connector ID (remember address bar will reveal that ID)

    2. connector_id
      connector_id
    3. Please choose Cancel (save would not be possible, because of missing parameters).

    4. Cancel_Configuration_Connector
      Cancel_Configuration_Connector
    5. You will get a new Connector with an Invalid! NEW warning. You can ignore the message, we will import the configuration and everything will be fine.

    6. invalid_new
      invalid_new
  2. Import the (modified) configuration, change the Connector ID before (we will use the Connector ID from the new created one (in our case it is the ID 4)

    1. import_configuration
      import_configuration
    2. checking the User sync connector via the UI after refreshing the page should reflect the changes

    3. CleanShot 2021-11-25 at 16.15.50@2x.png