Sync Service

The Sync Service synchronizes identities between the identity schema in the K2 database and the Identity Provider (AD or AAD, for example). Use the service's SmartObjects as shown in this article to perform an initial sync and set up recurring syncs, and to see the sync run history.

Do not edit or create a new Sync Service service instance. The Sync Service service type is a K2 system type and editing it or creating a new instance may cause errors on your K2 server.

Prerequisites

Use the new Sync Service by running a separate installer against your K2 Five 5.2, after which the new Sync Service will be enabled. See the Identity Synchronization and Caching KB article for more information including how to download the installer.

Working with SmartObjects

You must perform the following steps to configure the Sync Service:

  1. Get details for the identity providers (IdPs) in your environment
  2. Run the initial sync with your IdP and configure scheduled syncs
  3. Confirm the status of the initial sync and scheduled syncs

Find the Sync Service SmartObjects in the System category.

See the Sync Service SmartObject reference topic for information on the properties and methods of the SmartObjects.

Configuring the Sync Service

To start a manual sync or configure scheduled syncs, you need the provider details:

For example, if a sync provider instance is created for an Active Directory sync on a standalone Denallix server, the Provider Name is K2 and the Provider Instance Name is Denallix (the domain name).

Considerations

Re-execute a Full Sync

If you want to run a full sync instead of a differential sync at some point after the initial sync, you first need to clear the SyncState and LastSyncDateOffset column values stored in the Provider Instance table in the K2 database. Follow these steps:

  1. Find the instance ID by running this query:
    SELECT * FROM [SyncEngine].[ProviderInstance]
    This image is an example of what is returned. Your environment might be different.
  2. Use this query to clear the values for the SyncState and LastSyncDateOffset columns for whichever Provider Instance ID you choose:
    UPDATE [SyncEngine].[ProviderInstance] SET [SyncState] = NULL, [LastSyncDateOffset] = NULL WHERE ID = [Provider Instance]
    Replace [Provider Instance] with the ID for the Provider Instance on which you want to run the full sync. For example, ID 2 from the image. Remember that the ProviderID value corresponds to the ID value in the [SyncEngine].[Provider] table.
  3. Run a sync for the provider and does a full sync. The full sync generates new values for the SyncState and LastSyncDateOffset columns and from this point forward differential syncs are run.

Known Issues