Create a live sync task how-to
This guide shows how to create a minimal live synchronization task in midPoint which polls a resource for changes and propagates them into midPoint.
Prerequisites
-
A running midPoint instance (4.4 or later).
-
A configured, tested resource whose connector supports live synchronization. Verify the green Live Sync capability indicator on the resource detail page before proceeding.
You can do this by going to Resources > resource > Details and checking Live Sync is enabled (green). -
The OID of that resource. This is visible in:
-
The resource URL - Following
objectId=, for exampleebd0bf7b-7e80-4175-ba5e-4fd5de2ecd62. -
The resource XML - Open the resource, click Edit raw, and check the
oidattribute of the<resource>element.
-
-
For verification, the ability to create or modify accounts directly on the resource (LDAP browser, DB client, etc.).
Configuration overview
A live sync task is a TaskType object with an activity of type liveSynchronization.
It references a resource and one specific object class on that resource (kind + intent).
| Approach | Best suited for |
|---|---|
GUI |
First-time setup, manual creation, ad-hoc tasks for short-term troubleshooting. |
XML |
Reproducible deployments where the task definition is part of the system configuration package. |
Create live sync task
Option A — GUI
-
Navigate to Resources > resource > Defined Tasks
-
Click New task.
-
Click Live synchronization task.
-
Set the following and click Next:Resource objects:
Attribute Value Name
Live Sync — HR System -
Set the following and click Next:Schedule:
Attribute Value Resource
(select your resource)
Kind
accountIntent
default -
Set Interval to
10(seconds) and click Next:Distribution. -
Click Save $ Run.
Option B — XML
-
In the application main menu, navigate to Import object
-
In the Get object from section, select Embedded editor.
-
Paste the following XML into the editor:
<task xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"> <name>Live Sync — HR System</name> <executionState>runnable</executionState> <ownerRef oid="00000000-0000-0000-0000-000000000002" type="c:UserType"/> <activity> <work> <liveSynchronization> <resourceObjects> <resourceRef oid="REPLACE-WITH-RESOURCE-OID" type="c:ResourceType"/> <kind>account</kind> <intent>default</intent> </resourceObjects> </liveSynchronization> </work> <distribution> <workerThreads>1</workerThreads> </distribution> </activity> <schedule> <interval>10</interval> </schedule> </task> -
Replace
REPLACE-WITH-RESOURCE-OIDwith the resource OID, and adjustkind/intentif the resource defines additional object types.
-
Click Import object.
Verification
-
Confirm the task is running by going to Server tasks > All tasks. The new task should be listed there with a recent Last run timestamp.
-
Create or modify an account on the source resource. For an LDAP resource, add a new entry under the search base.
-
Wait for one polling interval (10 seconds in the example).
-
In midPoint, navigate to Users > All users. The new account should be represented as a user (created, updated, or linked according to the resource’s synchronization reactions).
-
Open the task and inspect the Operation statistics tab. The counters for processed objects should have advanced.